From cab70113c57a22c8a8d031975788adc786d3384a Mon Sep 17 00:00:00 2001 From: newby Date: Fri, 19 Jan 2024 13:44:38 -0800 Subject: [PATCH 1/2] anim: fix respawn while dead --- share/animate.qc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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; From db7bb2d3abf0a20110a85c8c8eeadb419950c036 Mon Sep 17 00:00:00 2001 From: newby Date: Fri, 19 Jan 2024 13:49:00 -0800 Subject: [PATCH 2/2] weapons: fix playercurrentweapon mistakenly made generic --- share/weapons.qc | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) 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;