diff --git a/share/animate.qc b/share/animate.qc index 6a4e63f1..428c0169 100644 --- a/share/animate.qc +++ b/share/animate.qc @@ -46,8 +46,10 @@ void FO_SetClientThink(void() func, float offset, float override = TRUE) { } void client_anim_frames(void() parent_thunk, void() extra, anim_t* anim) { - if (self.deadflag) + if (self.deadflag) { + player_run(); return; + } float tidx = *thinkindex()++ - 1; diff --git a/share/weapons.qc b/share/weapons.qc index 1769f2e9..b93fa43c 100644 --- a/share/weapons.qc +++ b/share/weapons.qc @@ -471,18 +471,21 @@ float self_class(); Slot self_current_slot(); float* self_clip_fired(Slot slot); -float FO_PlayerCurrentWeapon(entity player) { +float FO_CurrentWeapon() { FO_WeapInfo* wi = FO_SlotWeapInfo(self_class(), self_current_slot()); if (!wi) return WEAP_NONE; return wi->weapon; } -inline float FO_CurrentWeapon() { - return FO_PlayerCurrentWeapon(self); +#ifdef SSQC +float FO_PlayerCurrentWeapon(entity player) { + FO_WeapInfo* wi = FO_SlotWeapInfo(player.playerclass, player.current_slot); + if (!wi) + return WEAP_NONE; + return wi->weapon; } -#ifdef SSQC struct FO_WeapState { float weapon; Slot slot;