From ef95da81bce164492f4a9ccef8cf3b45e9423a53 Mon Sep 17 00:00:00 2001 From: Rudolf Polzer Date: Sun, 27 Mar 2011 07:32:42 +0200 Subject: [PATCH] move the minstanex_ammo hack out of WR_THINK, as now multiple WR_s may use it, even before WR_THINK is called --- qcsrc/server/w_minstanex.qc | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/qcsrc/server/w_minstanex.qc b/qcsrc/server/w_minstanex.qc index 8977b67fd..4481178de 100644 --- a/qcsrc/server/w_minstanex.qc +++ b/qcsrc/server/w_minstanex.qc @@ -169,10 +169,17 @@ void minstagib_ammocheck (void) void spawnfunc_weapon_minstanex (void); // defined in t_items.qc -float minstanex_ammo; float w_minstanex(float req) { float ammo_amount; + float minstanex_ammo; + + // now multiple WR_s use this + if(g_minstagib) + minstanex_ammo = 1; + else + minstanex_ammo = autocvar_g_balance_minstanex_ammo; + if (req == WR_AIM) { if(self.ammo_cells > 0) @@ -182,11 +189,6 @@ float w_minstanex(float req) } else if (req == WR_THINK) { - if(g_minstagib) - minstanex_ammo = 1; - else - minstanex_ammo = autocvar_g_balance_minstanex_ammo; - // if the laser uses load, we also consider its ammo for reloading if(autocvar_g_balance_minstanex_reload_ammo && autocvar_g_balance_minstanex_laser_ammo && self.clip_load < min(minstanex_ammo, autocvar_g_balance_minstanex_laser_ammo)) // forced reload weapon_action(self.weapon, WR_RELOAD); -- 2.39.2