]> de.git.xonotic.org Git - voretournament/voretournament.git/blobdiff - data/qcsrc/server/w_grabber.qc
Don't endlessly attempt to force reload the grabber if we're out of ammo, since we...
[voretournament/voretournament.git] / data / qcsrc / server / w_grabber.qc
index 1d2266bb245a0c87bf449811593b5d60508f3c7e..40786f57edb7cc5e1a36d392aaf30b8eafe06946 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