Don't endlessly attempt to force reload the grabber if we're out of ammo, since we...
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Mon, 28 Feb 2011 15:34:46 +0000 (17:34 +0200)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Mon, 28 Feb 2011 15:34:46 +0000 (17:34 +0200)
data/qcsrc/server/w_grabber.qc

index 1d2266b..40786f5 100644 (file)
@@ -75,7 +75,10 @@ float w_grabber(float req)
        else if (req == WR_THINK)\r
        {\r
                if(cvar("g_balance_grabber_reload_ammo") && self.clip_load < min(cvar("g_balance_grabber_primary_ammo"), cvar("g_balance_grabber_secondary_ammo"))) // forced reload\r
-                       weapon_action(self.weapon, WR_RELOAD);\r
+               {\r
+                       if(self.ammo_fuel >= 1) // we only have one weapon in VT, so nothing else to switch to if we're out of ammo\r
+                               weapon_action(self.weapon, WR_RELOAD);\r
+               }\r
                else if (self.BUTTON_ATCK || (!(self.items & IT_JETPACK) && self.BUTTON_JETPACK))\r
                {\r
                        if(time < self.weapon_delay)\r