]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix issues when shooting if you have unlimited ammo and current ammo is 0:
authorterencehill <piuntn@gmail.com>
Sun, 20 Mar 2011 22:32:23 +0000 (23:32 +0100)
committerterencehill <piuntn@gmail.com>
Sun, 20 Mar 2011 22:32:23 +0000 (23:32 +0100)
crylink and HLAC shoot once and then don't shoot anymore (or switch to a better weapon)
uzi doesn't shoot at all (or switches to a better weapon)

qcsrc/server/w_crylink.qc
qcsrc/server/w_hlac.qc
qcsrc/server/w_uzi.qc

index 5f5037ceec0af2e3243fb9aecd2f48095bb2b3ba..ef8dd8d163b85ec8ac4ca02a921f8352deb119c5 100644 (file)
@@ -583,6 +583,7 @@ float w_crylink(float req)
                                }
                                self.crylink_waitrelease = 0;
                                if(!w_crylink(WR_CHECKAMMO1) && !w_crylink(WR_CHECKAMMO2))
+                               if not(self.items & IT_UNLIMITED_WEAPON_AMMO)
                                {
                                        // ran out of ammo!
                                        self.cnt = WEP_CRYLINK;
index 8bb4c1de9d8da41a36368aae8b1b94533f28c655..0cf25e4f60c10922e09dd9c3273ec88bd889116d 100644 (file)
@@ -137,6 +137,7 @@ void HLAC_fire1_02()
        if (self.BUTTON_ATCK)
        {
                if (!weapon_action(self.weapon, WR_CHECKAMMO1))
+               if not(self.items & IT_UNLIMITED_WEAPON_AMMO)
                {
                        W_SwitchWeapon_Force(self, w_getbestweapon(self));
                        w_ready();
index e4531680035608473b0a3e286a43bfe52465a076..2f5b9bc7833badd1167a4205bc32c940e7550a1c 100644 (file)
@@ -83,6 +83,7 @@ void uzi_fire1_02()
        if (self.BUTTON_ATCK)
        {
                if (!weapon_action(self.weapon, WR_CHECKAMMO2))
+               if not(self.items & IT_UNLIMITED_WEAPON_AMMO)
                {
                        W_SwitchWeapon_Force(self, w_getbestweapon(self));
                        w_ready();
@@ -113,6 +114,7 @@ void uzi_mode1_fire_auto()
        }
 
        if (!weapon_action(self.weapon, WR_CHECKAMMO1))
+       if not(self.items & IT_UNLIMITED_WEAPON_AMMO)
        {
                W_SwitchWeapon_Force(self, w_getbestweapon(self));
                w_ready();