]> de.git.xonotic.org Git - voretournament/voretournament.git/blobdiff - data/qcsrc/server/cl_weaponsystem.qc
Don't attempt to switch weapons if we're out of ammo, since we only have one weapon...
[voretournament/voretournament.git] / data / qcsrc / server / cl_weaponsystem.qc
index a7bfd3b72331f26a483ae1cf4d3b3cfd5b895adc..04908ba697b232466bf3e4fd5fc35389e5e17da7 100644 (file)
@@ -1664,7 +1664,7 @@ void W_Reload(float sent_ammo_min, float sent_ammo_amount, float sent_time, stri
        if (self.clip_load >= self.reload_ammo_amount)\r
                return;\r
        // no ammo, so nothing to load\r
-       if(!self.(self.current_ammo) && self.reload_ammo_min)\r
+       if(self.(self.current_ammo) < 1 && self.reload_ammo_min)\r
        if not(self.items & IT_UNLIMITED_WEAPON_AMMO)\r
        {\r
                if(clienttype(self) == CLIENTTYPE_REAL && self.reload_complain < time)\r
@@ -1674,11 +1674,12 @@ void W_Reload(float sent_ammo_min, float sent_ammo_amount, float sent_time, stri
                        self.reload_complain = time + 1;\r
                }\r
                // switch away if the amount of ammo is not enough to keep using this weapon\r
-               if not(weapon_action(self.weapon, WR_CHECKAMMO1) + weapon_action(self.weapon, WR_CHECKAMMO2))\r
+               // disabled since we only have one weapon in VT, so nothing else to switch to if we're out of ammo\r
+               /*if not(weapon_action(self.weapon, WR_CHECKAMMO1) + weapon_action(self.weapon, WR_CHECKAMMO2))\r
                {\r
                        self.clip_load = -1; // reload later\r
                        W_SwitchToOtherWeapon(self);\r
-               }\r
+               }*/\r
                return;\r
        }\r
 \r