mirror of
https://github.com/s1lentq/ReGameDLL_CS.git
synced 2024-12-27 23:25:41 +03:00
Fix crash when custom SV_StudioSetupBones exported to the engine (#40)
* Fix crash when custom SV_StudioSetupBones exported to the engine
This commit is contained in:
parent
e6df6ef577
commit
4f1ca61628
@ -1062,7 +1062,6 @@ void SV_StudioSetupBones(model_t *pModel, float frame, int sequence, const vec_t
|
||||
/*static */float q3[MAXSTUDIOBONES][4], q4[MAXSTUDIOBONES][4];
|
||||
|
||||
float_precision s, t;
|
||||
|
||||
s = GetPlayerYaw(pEdict);
|
||||
t = GetPlayerPitch(pEdict);
|
||||
|
||||
|
@ -8030,6 +8030,9 @@ void CBasePlayer::ResetStamina()
|
||||
|
||||
float_precision GetPlayerPitch(const edict_t *pEdict)
|
||||
{
|
||||
if( !pEdict )
|
||||
return 0.0f;
|
||||
|
||||
entvars_t *pev = VARS(const_cast<edict_t *>(pEdict));
|
||||
CBasePlayer *pPlayer = dynamic_cast<CBasePlayer *>(CBasePlayer::Instance(pev));
|
||||
|
||||
@ -8041,6 +8044,9 @@ float_precision GetPlayerPitch(const edict_t *pEdict)
|
||||
|
||||
float_precision GetPlayerYaw(const edict_t *pEdict)
|
||||
{
|
||||
if( !pEdict )
|
||||
return 0.0f;
|
||||
|
||||
entvars_t *pev = VARS(const_cast<edict_t *>(pEdict));
|
||||
CBasePlayer *pPlayer = dynamic_cast<CBasePlayer *>(CBasePlayer::Instance(pev));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user