]> de.git.xonotic.org Git - voretournament/voretournament.git/blobdiff - data/qcsrc/server/cl_weaponsystem.qc
Since we don't have an infinite ammo weapon in vore tournament, allow switching to...
[voretournament/voretournament.git] / data / qcsrc / server / cl_weaponsystem.qc
index f5dab95734ba51b05773aec973f0fd5a905be392..2b06fed1d0c13885be68dfac251dd6b81202afe8 100644 (file)
@@ -855,8 +855,9 @@ void CL_SpawnWeaponentity()
 \r
 float client_hasweapon(entity cl, float wpn, float andammo, float complain)\r
 {\r
 \r
 float client_hasweapon(entity cl, float wpn, float andammo, float complain)\r
 {\r
-       local float weaponbit, f;\r
-       local entity oldself;\r
+       local float weaponbit;\r
+       //local float weaponbit, f;\r
+       //local entity oldself;\r
 \r
        if(time < self.hasweapon_complain_spam)\r
                complain = 0;\r
 \r
        if(time < self.hasweapon_complain_spam)\r
                complain = 0;\r
@@ -872,7 +873,8 @@ float client_hasweapon(entity cl, float wpn, float andammo, float complain)
        weaponbit = W_WeaponBit(wpn);\r
        if (cl.weapons & weaponbit)\r
        {\r
        weaponbit = W_WeaponBit(wpn);\r
        if (cl.weapons & weaponbit)\r
        {\r
-               if (andammo)\r
+               // since we don't have an infinite ammo weapon in vore tournament, allow switching to the grabber even when it has no ammo\r
+               /*if (andammo)\r
                {\r
                        if(cl.items & IT_UNLIMITED_WEAPON_AMMO)\r
                        {\r
                {\r
                        if(cl.items & IT_UNLIMITED_WEAPON_AMMO)\r
                        {\r
@@ -896,7 +898,7 @@ float client_hasweapon(entity cl, float wpn, float andammo, float complain)
                                }\r
                                return FALSE;\r
                        }\r
                                }\r
                                return FALSE;\r
                        }\r
-               }\r
+               }*/\r
                return TRUE;\r
        }\r
        if (complain)\r
                return TRUE;\r
        }\r
        if (complain)\r
@@ -998,7 +1000,8 @@ float weapon_prepareattack_checkammo(float secondary)
                        self.prevdryfire = time;\r
                }\r
 \r
                        self.prevdryfire = time;\r
                }\r
 \r
-               W_SwitchToOtherWeapon(self);\r
+               // since we don't have an infinite ammo weapon in vore tournament, allow switching to the grabber even when it has no ammo\r
+               //W_SwitchToOtherWeapon(self);\r
                return FALSE;\r
        }\r
        return TRUE;\r
                return FALSE;\r
        }\r
        return TRUE;\r