]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge branch 'terencehill/unlimited_ammo_fixes' into 'master'
authorMario <zacjardine@y7mail.com>
Sat, 18 Apr 2015 03:51:49 +0000 (03:51 +0000)
committerMario <zacjardine@y7mail.com>
Sat, 18 Apr 2015 03:51:49 +0000 (03:51 +0000)
Unlimited ammo fixes

Fix a few weapons not working with 0 ammo while owning the unlimited ammo powerup
Namely Arc, Devastator and Hagar.

See merge request !119

1  2 
qcsrc/common/weapons/w_arc.qc

index 5931f2fcc57624a52c11e8c72b2322c0c21450b0,5176af6c725245a221ef87ff1a2a541b045770f6..3024c689ed00c0cf5de1335bc985dd9687f37130
@@@ -239,8 -239,6 +239,8 @@@ void W_Arc_Beam_Think(void
                ||
                self.owner.frozen
                ||
 +              self.owner.vehicle
 +              ||
                (WEP_CVAR(arc, overheat_max) > 0 && self.beam_heat >= WEP_CVAR(arc, overheat_max))
        )
        {
                entity oldself = self;
                self = self.owner;
                if(!WEP_ACTION(WEP_ARC, WR_CHECKAMMO1) && !WEP_ACTION(WEP_ARC, WR_CHECKAMMO2))
+               if(!(self.items & IT_UNLIMITED_WEAPON_AMMO))
                {
                        // note: this doesn't force the switch
                        W_SwitchToOtherWeapon(self);