diff --git a/regamedll/dlls/animation.cpp b/regamedll/dlls/animation.cpp index 5ae3c8fa..12a70a08 100644 --- a/regamedll/dlls/animation.cpp +++ b/regamedll/dlls/animation.cpp @@ -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); diff --git a/regamedll/dlls/player.cpp b/regamedll/dlls/player.cpp index f11a4146..491982c0 100644 --- a/regamedll/dlls/player.cpp +++ b/regamedll/dlls/player.cpp @@ -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(pEdict)); CBasePlayer *pPlayer = dynamic_cast(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(pEdict)); CBasePlayer *pPlayer = dynamic_cast(CBasePlayer::Instance(pev));