From: FruitieX Date: Wed, 17 Nov 2010 18:32:43 +0000 (+0200) Subject: always check the nex primary ammo when trying to charge. We don't want to allow switc... X-Git-Tag: xonotic-v0.1.0preview~122^2~3^2~2 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=3711f556d8756c9f2c50880e38ad5ca623f2efec;p=xonotic%2Fxonotic-data.pk3dir.git always check the nex primary ammo when trying to charge. We don't want to allow switching back to the nex if we're out of ammo. --- diff --git a/qcsrc/server/w_nex.qc b/qcsrc/server/w_nex.qc index 2d0cc7a60..97cdaae3e 100644 --- a/qcsrc/server/w_nex.qc +++ b/qcsrc/server/w_nex.qc @@ -175,9 +175,7 @@ float w_nex(float req) { if(cvar("g_balance_nex_secondary_charge_pool")) return TRUE; - if(cvar("g_balance_nex_secondary_charge") && cvar("g_balance_nex_secondary_ammo")) // if charge consumes ammo, don't allow consuming so much that we cant fire a primary anymore - return self.ammo_cells >= cvar("g_balance_nex_primary_ammo"); - return self.ammo_cells >= cvar("g_balance_nex_secondary_ammo"); + return self.ammo_cells >= cvar("g_balance_nex_primary_ammo"); // don't allow charging if we don't have enough ammo } return TRUE; };