From 73431c4592776fb5b2792ab5d39ee56810abb89d Mon Sep 17 00:00:00 2001 From: terencehill Date: Mon, 13 Jun 2011 01:13:47 +0200 Subject: [PATCH] Damn! PlayerPreThink code is buggy! The countdown didn't stop when dead because (self.deadflag == DEAD_NO) is always true there... Add a FIXME comment as other code does that check and needs to be fixed. --- qcsrc/server/cl_client.qc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/qcsrc/server/cl_client.qc b/qcsrc/server/cl_client.qc index 3c61ba435..4a5a8377f 100644 --- a/qcsrc/server/cl_client.qc +++ b/qcsrc/server/cl_client.qc @@ -2722,6 +2722,9 @@ void PlayerPreThink (void) player_powerups(); } + if (g_minstagib) + minstagib_ammocheck(); + if (self.deadflag != DEAD_NO) { float button_pressed, force_respawn; @@ -2769,6 +2772,8 @@ void PlayerPreThink (void) } return; } + // FIXME from now on self.deadflag is always 0 (and self.health is never < 1) + // so (self.deadflag == DEAD_NO) is always true in the code below if(g_touchexplode) if(time > self.touchexplode_time) @@ -2877,9 +2882,6 @@ void PlayerPreThink (void) if(autocvar_g_balance_nex_charge_rot_rate && self.nex_charge > autocvar_g_balance_nex_charge_limit && self.nex_charge_rottime < time) self.nex_charge = bound(autocvar_g_balance_nex_charge_limit, self.nex_charge - autocvar_g_balance_nex_charge_rot_rate * frametime / W_TICSPERFRAME, 1); - if (g_minstagib) - minstagib_ammocheck(); - if(frametime) player_anim(); -- 2.39.2