]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Remove duplicate WEP_ prefix for WEP_AMMO usage
authorSamual Lenks <samual@xonotic.org>
Thu, 2 Jan 2014 00:46:57 +0000 (19:46 -0500)
committerSamual Lenks <samual@xonotic.org>
Thu, 2 Jan 2014 00:46:57 +0000 (19:46 -0500)
14 files changed:
qcsrc/common/weapons/w_arc.qc
qcsrc/common/weapons/w_crylink.qc
qcsrc/common/weapons/w_devastator.qc
qcsrc/common/weapons/w_electro.qc
qcsrc/common/weapons/w_hagar.qc
qcsrc/common/weapons/w_hlac.qc
qcsrc/common/weapons/w_machinegun.qc
qcsrc/common/weapons/w_minelayer.qc
qcsrc/common/weapons/w_mortar.qc
qcsrc/common/weapons/w_rifle.qc
qcsrc/common/weapons/w_seeker.qc
qcsrc/common/weapons/w_vaporizer.qc
qcsrc/common/weapons/w_vortex.qc
qcsrc/common/weapons/weapons.qh

index 83285d5f42c1546b660ebb622951782677a0f89c..62bf5dd0034fcb6f01d79a0a031b2eea168f8ca0 100644 (file)
@@ -79,7 +79,7 @@ void W_Arc_Beam_Think()
                remove(self);
                return;
        }
-       if (self.owner.weaponentity.state != WS_INUSE || (self.owner.WEP_AMMO(WEP_ARC) <= 0 && !(self.owner.items & IT_UNLIMITED_WEAPON_AMMO)) || self.owner.deadflag != DEAD_NO || !self.owner.BUTTON_ATCK || self.owner.freezetag_frozen)
+       if (self.owner.weaponentity.state != WS_INUSE || (self.owner.WEP_AMMO(ARC) <= 0 && !(self.owner.items & IT_UNLIMITED_WEAPON_AMMO)) || self.owner.deadflag != DEAD_NO || !self.owner.BUTTON_ATCK || self.owner.freezetag_frozen)
        {
                if(self == self.owner.arc_beam)
                        self.owner.arc_beam = world;
@@ -97,8 +97,8 @@ void W_Arc_Beam_Think()
        {
                if(WEP_CVAR_PRI(arc, ammo))
                {
-                       dt = min(dt, self.owner.WEP_AMMO(WEP_ARC) / WEP_CVAR_PRI(arc, ammo));
-                       self.owner.WEP_AMMO(WEP_ARC) = max(0, self.owner.WEP_AMMO(WEP_ARC) - WEP_CVAR_PRI(arc, ammo) * frametime);
+                       dt = min(dt, self.owner.WEP_AMMO(ARC) / WEP_CVAR_PRI(arc, ammo));
+                       self.owner.WEP_AMMO(ARC) = max(0, self.owner.WEP_AMMO(ARC) - WEP_CVAR_PRI(arc, ammo) * frametime);
                }
        }
 
@@ -254,11 +254,11 @@ float W_Arc(float req)
                }
                case WR_CHECKAMMO1:
                {
-                       return !WEP_CVAR_PRI(arc, ammo) || (self.WEP_AMMO(WEP_ARC) > 0);
+                       return !WEP_CVAR_PRI(arc, ammo) || (self.WEP_AMMO(ARC) > 0);
                }
                case WR_CHECKAMMO2:
                {
-                       return self.WEP_AMMO(WEP_ARC) >= WEP_CVAR_SEC(arc, ammo);
+                       return self.WEP_AMMO(ARC) >= WEP_CVAR_SEC(arc, ammo);
                }
                case WR_CONFIG:
                {
index 5d38038341877b9b4c9154e53caf5f3e80d90cf9..c2f6b49de000be9ac26112c972e811f4a8aec16d 100644 (file)
@@ -648,7 +648,7 @@ float W_Crylink(float req)
                        if(self.crylink_lastgroup && self.crylink_waitrelease)
                                return TRUE;
 
-                       ammo_amount = self.WEP_AMMO(WEP_CRYLINK) >= WEP_CVAR_PRI(crylink, ammo);
+                       ammo_amount = self.WEP_AMMO(CRYLINK) >= WEP_CVAR_PRI(crylink, ammo);
                        ammo_amount += self.(weapon_load[WEP_CRYLINK]) >= WEP_CVAR_PRI(crylink, ammo);
                        return ammo_amount;
                }
@@ -658,7 +658,7 @@ float W_Crylink(float req)
                        if(self.crylink_lastgroup && self.crylink_waitrelease)
                                return TRUE;
 
-                       ammo_amount = self.WEP_AMMO(WEP_CRYLINK) >= WEP_CVAR_SEC(crylink, ammo);
+                       ammo_amount = self.WEP_AMMO(CRYLINK) >= WEP_CVAR_SEC(crylink, ammo);
                        ammo_amount += self.(weapon_load[WEP_CRYLINK]) >= WEP_CVAR_SEC(crylink, ammo);
                        return ammo_amount;
                }
index dcdbe3894f47cbc85aa916001cdac68e8ddd8aad..7298ded1517540d2f208982095053dad548fa200 100644 (file)
@@ -82,7 +82,7 @@ void W_Devastator_Explode()
 
        if (self.realowner.weapon == WEP_DEVASTATOR)
        {
-               if(self.realowner.WEP_AMMO(WEP_DEVASTATOR) < WEP_CVAR(devastator, ammo))
+               if(self.realowner.WEP_AMMO(DEVASTATOR) < WEP_CVAR(devastator, ammo))
                {
                        self.realowner.cnt = WEP_DEVASTATOR;
                        ATTACK_FINISHED(self.realowner) = time;
@@ -103,7 +103,7 @@ void W_Devastator_DoRemoteExplode()
 
        if (self.realowner.weapon == WEP_DEVASTATOR)
        {
-               if(self.realowner.WEP_AMMO(WEP_DEVASTATOR) < WEP_CVAR(devastator, ammo))
+               if(self.realowner.WEP_AMMO(DEVASTATOR) < WEP_CVAR(devastator, ammo))
                {
                        self.realowner.cnt = WEP_DEVASTATOR;
                        ATTACK_FINISHED(self.realowner) = time;
@@ -415,10 +415,10 @@ float W_Devastator(float req)
                                ammo_amount = FALSE;
                                if(WEP_CVAR(devastator, reload_ammo))
                                {
-                                       if(self.WEP_AMMO(WEP_DEVASTATOR) < WEP_CVAR(devastator, ammo) && self.(weapon_load[WEP_DEVASTATOR]) < WEP_CVAR(devastator, ammo))
+                                       if(self.WEP_AMMO(DEVASTATOR) < WEP_CVAR(devastator, ammo) && self.(weapon_load[WEP_DEVASTATOR]) < WEP_CVAR(devastator, ammo))
                                                ammo_amount = TRUE;
                                }
-                               else if(self.WEP_AMMO(WEP_DEVASTATOR) < WEP_CVAR(devastator, ammo))
+                               else if(self.WEP_AMMO(DEVASTATOR) < WEP_CVAR(devastator, ammo))
                                        ammo_amount = TRUE;
                                return !ammo_amount;
                        }
index 491e951d32b793fc225744ff5aa3c1b5416c6bab..6fb5e7bdc584e72e77cb587862917a3e3d5874b8 100644 (file)
@@ -488,7 +488,7 @@ float W_Electro(float req)
                }
                case WR_CHECKAMMO1:
                {
-                       ammo_amount = self.WEP_AMMO(WEP_ELECTRO) >= WEP_CVAR_PRI(electro, ammo);
+                       ammo_amount = self.WEP_AMMO(ELECTRO) >= WEP_CVAR_PRI(electro, ammo);
                        ammo_amount += self.(weapon_load[WEP_ELECTRO]) >= WEP_CVAR_PRI(electro, ammo);
                        return ammo_amount;
                }
@@ -496,12 +496,12 @@ float W_Electro(float req)
                {
                        if(WEP_CVAR(electro, combo_safeammocheck)) // true if you can fire at least one secondary blob AND one primary shot after it, otherwise false.
                        {
-                               ammo_amount = self.WEP_AMMO(WEP_ELECTRO) >= WEP_CVAR_SEC(electro, ammo) + WEP_CVAR_PRI(electro, ammo);
+                               ammo_amount = self.WEP_AMMO(ELECTRO) >= WEP_CVAR_SEC(electro, ammo) + WEP_CVAR_PRI(electro, ammo);
                                ammo_amount += self.(weapon_load[WEP_ELECTRO]) >= WEP_CVAR_SEC(electro, ammo) + WEP_CVAR_PRI(electro, ammo);
                        }
                        else
                        {
-                               ammo_amount = self.WEP_AMMO(WEP_ELECTRO) >= WEP_CVAR_SEC(electro, ammo);
+                               ammo_amount = self.WEP_AMMO(ELECTRO) >= WEP_CVAR_SEC(electro, ammo);
                                ammo_amount += self.(weapon_load[WEP_ELECTRO]) >= WEP_CVAR_SEC(electro, ammo);
                        }
                        return ammo_amount;
index c68775c46dad9cf30db6e795b4d4c382912fa257..b1a8be24f3e9ffb2a777a512e7843dfe0bc07ba7 100644 (file)
@@ -298,7 +298,7 @@ void W_Hagar_Attack2_Load (void)
        if(autocvar_g_balance_hagar_reload_ammo)
                enough_ammo = self.(weapon_load[WEP_HAGAR]) >= WEP_CVAR_SEC(hagar, ammo);
        else
-               enough_ammo = self.WEP_AMMO(WEP_HAGAR) >= WEP_CVAR_SEC(hagar, ammo);
+               enough_ammo = self.WEP_AMMO(HAGAR) >= WEP_CVAR_SEC(hagar, ammo);
 
        if(self.BUTTON_ATCK2)
        {
@@ -464,13 +464,13 @@ float W_Hagar(float req)
                }
                case WR_CHECKAMMO1:
                {
-                       ammo_amount = self.WEP_AMMO(WEP_HAGAR) >= WEP_CVAR_PRI(hagar, ammo);
+                       ammo_amount = self.WEP_AMMO(HAGAR) >= WEP_CVAR_PRI(hagar, ammo);
                        ammo_amount += self.(weapon_load[WEP_HAGAR]) >= WEP_CVAR_PRI(hagar, ammo);
                        return ammo_amount;
                }
                case WR_CHECKAMMO2:
                {
-                       ammo_amount = self.WEP_AMMO(WEP_HAGAR) >= WEP_CVAR_SEC(hagar, ammo);
+                       ammo_amount = self.WEP_AMMO(HAGAR) >= WEP_CVAR_SEC(hagar, ammo);
                        ammo_amount += self.(weapon_load[WEP_HAGAR]) >= WEP_CVAR_SEC(hagar, ammo);
                        return ammo_amount;
                }
index 3b969c651f087576c7da7879680a0a7e9f2ffa96..eb6bfcffda896020760b08c5d9f68b1e698edc79 100644 (file)
@@ -245,13 +245,13 @@ float W_HLAC(float req)
                }
                case WR_CHECKAMMO1:
                {
-                       ammo_amount = self.WEP_AMMO(WEP_HLAC) >= WEP_CVAR_PRI(hlac, ammo);
+                       ammo_amount = self.WEP_AMMO(HLAC) >= WEP_CVAR_PRI(hlac, ammo);
                        ammo_amount += self.(weapon_load[WEP_HLAC]) >= WEP_CVAR_PRI(hlac, ammo);
                        return ammo_amount;
                }
                case WR_CHECKAMMO2:
                {
-                       ammo_amount = self.WEP_AMMO(WEP_HLAC) >= WEP_CVAR_SEC(hlac, ammo);
+                       ammo_amount = self.WEP_AMMO(HLAC) >= WEP_CVAR_SEC(hlac, ammo);
                        ammo_amount += self.(weapon_load[WEP_HLAC]) >= WEP_CVAR_SEC(hlac, ammo);
                        return ammo_amount;
                }
index cd3b2baeb002ea70545c88152d78dfb487df82a3..2fd5bf27d38f5bf1d1980c2854344aeaa7d21310 100644 (file)
@@ -310,9 +310,9 @@ float W_MachineGun(float req)
                case WR_CHECKAMMO1:
                {
                        if(WEP_CVAR(machinegun, mode) == 1)
-                               ammo_amount = self.WEP_AMMO(WEP_MACHINEGUN) >= WEP_CVAR(machinegun, sustained_ammo);
+                               ammo_amount = self.WEP_AMMO(MACHINEGUN) >= WEP_CVAR(machinegun, sustained_ammo);
                        else
-                               ammo_amount = self.WEP_AMMO(WEP_MACHINEGUN) >= WEP_CVAR(machinegun, first_ammo);
+                               ammo_amount = self.WEP_AMMO(MACHINEGUN) >= WEP_CVAR(machinegun, first_ammo);
 
                        if(WEP_CVAR(machinegun, reload_ammo))
                        {
@@ -326,9 +326,9 @@ float W_MachineGun(float req)
                case WR_CHECKAMMO2:
                {
                        if(WEP_CVAR(machinegun, mode) == 1)
-                               ammo_amount = self.WEP_AMMO(WEP_MACHINEGUN) >= WEP_CVAR(machinegun, burst_ammo);
+                               ammo_amount = self.WEP_AMMO(MACHINEGUN) >= WEP_CVAR(machinegun, burst_ammo);
                        else
-                               ammo_amount = self.WEP_AMMO(WEP_MACHINEGUN) >= WEP_CVAR(machinegun, first_ammo);
+                               ammo_amount = self.WEP_AMMO(MACHINEGUN) >= WEP_CVAR(machinegun, first_ammo);
 
                        if(WEP_CVAR(machinegun, reload_ammo))
                        {
index c46120a3b901a32d510a5dfecc17dab4724d3506..19d49b50d7d6c9ff5556613cf68df88f99498b2f 100644 (file)
@@ -505,7 +505,7 @@ float W_MineLayer(float req)
                        if(autocvar_g_balance_minelayer_reload_ammo && self.clip_load < WEP_CVAR(minelayer, ammo)) // forced reload
                        {
                                // not if we're holding the minelayer without enough ammo, but can detonate existing mines
-                               if(!(W_MineLayer_PlacedMines(FALSE) && self.WEP_AMMO(WEP_MINE_LAYER) < WEP_CVAR(minelayer, ammo)))
+                               if(!(W_MineLayer_PlacedMines(FALSE) && self.WEP_AMMO(MINE_LAYER) < WEP_CVAR(minelayer, ammo)))
                                        WEP_ACTION(self.weapon, WR_RELOAD);
                        }
                        else if (self.BUTTON_ATCK)
@@ -544,7 +544,7 @@ float W_MineLayer(float req)
                        // don't switch while placing a mine
                        if (ATTACK_FINISHED(self) <= time || self.weapon != WEP_MINE_LAYER)
                        {
-                               ammo_amount = self.WEP_AMMO(WEP_MINE_LAYER) >= WEP_CVAR(minelayer, ammo);
+                               ammo_amount = self.WEP_AMMO(MINE_LAYER) >= WEP_CVAR(minelayer, ammo);
                                ammo_amount += self.(weapon_load[WEP_MINE_LAYER]) >= WEP_CVAR(minelayer, ammo);
                                return ammo_amount;
                        }
index 4737673fc793ea3b3ff201894eb512e6eb0285db..39fc9c407b30f65f738dc2c02d2b43ab74ede8c3 100644 (file)
@@ -416,13 +416,13 @@ float W_Mortar(float req)
                }
                case WR_CHECKAMMO1:
                {
-                       ammo_amount = self.WEP_AMMO(WEP_MORTAR) >= WEP_CVAR_PRI(mortar, ammo);
+                       ammo_amount = self.WEP_AMMO(MORTAR) >= WEP_CVAR_PRI(mortar, ammo);
                        ammo_amount += self.(weapon_load[WEP_MORTAR]) >= WEP_CVAR_PRI(mortar, ammo);
                        return ammo_amount;
                }
                case WR_CHECKAMMO2:
                {
-                       ammo_amount = self.WEP_AMMO(WEP_MORTAR) >= WEP_CVAR_SEC(mortar, ammo);
+                       ammo_amount = self.WEP_AMMO(MORTAR) >= WEP_CVAR_SEC(mortar, ammo);
                        ammo_amount += self.(weapon_load[WEP_MORTAR]) >= WEP_CVAR_SEC(mortar, ammo);
                        return ammo_amount;
                }
index f5a07507566615088b55d086ece23ee3ed56d407..530eccf715ea965638b227aa218e4d22f240e6c3 100644 (file)
@@ -91,7 +91,7 @@ void W_Rifle_BulletHail_Continue()
        af = ATTACK_FINISHED(self);
        self.switchweapon = self.weapon;
        ATTACK_FINISHED(self) = time;
-       print(ftos(self.WEP_AMMO(WEP_RIFLE)), "\n");
+       print(ftos(self.WEP_AMMO(RIFLE)), "\n");
        r = weapon_prepareattack(self.rifle_bullethail_frame == WFRAME_FIRE2, self.rifle_bullethail_refire);
        if(self.switchweapon == self.weapon)
                self.switchweapon = sw;
@@ -209,13 +209,13 @@ float W_Rifle(float req)
                }
                case WR_CHECKAMMO1:
                {
-                       ammo_amount = self.WEP_AMMO(WEP_RIFLE) >= WEP_CVAR_PRI(rifle, ammo);
+                       ammo_amount = self.WEP_AMMO(RIFLE) >= WEP_CVAR_PRI(rifle, ammo);
                        ammo_amount += self.(weapon_load[WEP_RIFLE]) >= WEP_CVAR_PRI(rifle, ammo);
                        return ammo_amount;
                }
                case WR_CHECKAMMO2:
                {
-                       ammo_amount = self.WEP_AMMO(WEP_RIFLE) >= WEP_CVAR_SEC(rifle, ammo);
+                       ammo_amount = self.WEP_AMMO(RIFLE) >= WEP_CVAR_SEC(rifle, ammo);
                        ammo_amount += self.(weapon_load[WEP_RIFLE]) >= WEP_CVAR_SEC(rifle, ammo);
                        return ammo_amount;
                }
index b6221538a2b8fe785069c2018c17545c69b2b643..943734b7b5b3a514d9aca88e650ee5b1baee866d 100644 (file)
@@ -412,7 +412,7 @@ void W_Seeker_Vollycontroller_Think() // TODO: Merge this with W_Seeker_Attack
        entity oldself,oldenemy;
        self.cnt = self.cnt - 1;
 
-       if((!(self.realowner.items & IT_UNLIMITED_AMMO) && self.realowner.WEP_AMMO(WEP_SEEKER) < WEP_CVAR(seeker, missile_ammo)) || (self.cnt <= -1) || (self.realowner.deadflag != DEAD_NO) || (self.realowner.switchweapon != WEP_SEEKER))
+       if((!(self.realowner.items & IT_UNLIMITED_AMMO) && self.realowner.WEP_AMMO(SEEKER) < WEP_CVAR(seeker, missile_ammo)) || (self.cnt <= -1) || (self.realowner.deadflag != DEAD_NO) || (self.realowner.switchweapon != WEP_SEEKER))
        {
                remove(self);
                return;
@@ -671,12 +671,12 @@ float W_Seeker(float req)
                {
                        if (WEP_CVAR(seeker, type) == 1)
                        {
-                               ammo_amount = self.WEP_AMMO(WEP_SEEKER) >= WEP_CVAR(seeker, missile_ammo);
+                               ammo_amount = self.WEP_AMMO(SEEKER) >= WEP_CVAR(seeker, missile_ammo);
                                ammo_amount += self.(weapon_load[WEP_SEEKER]) >= WEP_CVAR(seeker, missile_ammo);
                        }
                        else
                        {
-                               ammo_amount = self.WEP_AMMO(WEP_SEEKER) >= WEP_CVAR(seeker, tag_ammo);
+                               ammo_amount = self.WEP_AMMO(SEEKER) >= WEP_CVAR(seeker, tag_ammo);
                                ammo_amount += self.(weapon_load[WEP_SEEKER]) >= WEP_CVAR(seeker, tag_ammo);
                        }
                        return ammo_amount;
@@ -685,12 +685,12 @@ float W_Seeker(float req)
                {
                        if (WEP_CVAR(seeker, type) == 1)
                        {
-                               ammo_amount = self.WEP_AMMO(WEP_SEEKER) >= WEP_CVAR(seeker, tag_ammo);
+                               ammo_amount = self.WEP_AMMO(SEEKER) >= WEP_CVAR(seeker, tag_ammo);
                                ammo_amount += self.(weapon_load[WEP_SEEKER]) >= WEP_CVAR(seeker, tag_ammo);
                        }
                        else
                        {
-                               ammo_amount = self.WEP_AMMO(WEP_SEEKER) >= WEP_CVAR(seeker, flac_ammo);
+                               ammo_amount = self.WEP_AMMO(SEEKER) >= WEP_CVAR(seeker, flac_ammo);
                                ammo_amount += self.(weapon_load[WEP_SEEKER]) >= WEP_CVAR(seeker, flac_ammo);
                        }
                        return ammo_amount;
index 66510bc1c24a673cb75a405af90f935b32678265..7ef66ab58411782c38a5a251c4d677652193138c 100644 (file)
@@ -122,7 +122,7 @@ float W_Vaporizer(float req)
        {
                case WR_AIM:
                {
-                       if(self.WEP_AMMO(WEP_VAPORIZER) > 0)
+                       if(self.WEP_AMMO(VAPORIZER) > 0)
                                self.BUTTON_ATCK = bot_aim(1000000, 0, 1, FALSE);
                        else
                                self.BUTTON_ATCK2 = bot_aim(WEP_CVAR_SEC(vaporizer, speed), 0, WEP_CVAR_SEC(vaporizer, lifetime), FALSE); // WEAPONTODO: replace with proper vaporizer cvars
@@ -196,13 +196,13 @@ float W_Vaporizer(float req)
                }
                case WR_SETUP:
                {
-                       self.ammo_field = WEP_AMMO(WEP_VAPORIZER);
+                       self.ammo_field = WEP_AMMO(VAPORIZER);
                        self.vaporizer_lasthit = 0;
                        return TRUE;
                }
                case WR_CHECKAMMO1:
                {
-                       ammo_amount = self.WEP_AMMO(WEP_VAPORIZER) >= vaporizer_ammo;
+                       ammo_amount = self.WEP_AMMO(VAPORIZER) >= vaporizer_ammo;
                        ammo_amount += self.(weapon_load[WEP_VAPORIZER]) >= vaporizer_ammo;
                        return ammo_amount;
                }
@@ -210,7 +210,7 @@ float W_Vaporizer(float req)
                {
                        if(!WEP_CVAR_SEC(vaporizer, ammo))
                                return TRUE;
-                       ammo_amount = self.WEP_AMMO(WEP_VAPORIZER) >= WEP_CVAR_SEC(vaporizer, ammo);
+                       ammo_amount = self.WEP_AMMO(VAPORIZER) >= WEP_CVAR_SEC(vaporizer, ammo);
                        ammo_amount += self.(weapon_load[WEP_VAPORIZER]) >= WEP_CVAR_SEC(vaporizer, ammo);
                        return ammo_amount;
                }
index 019d81293e8a4a5e8b8400664cc309e3319dd179..c1bda8400565327f87c71e1f3e536fa0958c8d9d 100644 (file)
@@ -204,11 +204,11 @@ float W_Vortex(float req)
                                                                                }
                                                                                else
                                                                                {
-                                                                                       dt = min(dt, (self.WEP_AMMO(WEP_VORTEX) - WEP_CVAR_PRI(vortex, ammo)) / WEP_CVAR_SEC(vortex, ammo));
+                                                                                       dt = min(dt, (self.WEP_AMMO(VORTEX) - WEP_CVAR_PRI(vortex, ammo)) / WEP_CVAR_SEC(vortex, ammo));
                                                                                        dt = max(0, dt);
                                                                                        if(dt > 0)
                                                                                        {
-                                                                                               self.WEP_AMMO(WEP_VORTEX) = max(WEP_CVAR_SEC(vortex, ammo), self.WEP_AMMO(WEP_VORTEX) - WEP_CVAR_SEC(vortex, ammo) * dt);
+                                                                                               self.WEP_AMMO(VORTEX) = max(WEP_CVAR_SEC(vortex, ammo), self.WEP_AMMO(VORTEX) - WEP_CVAR_SEC(vortex, ammo) * dt);
                                                                                        }
                                                                                }
                                                                        }
@@ -252,7 +252,7 @@ float W_Vortex(float req)
                }
                case WR_CHECKAMMO1:
                {
-                       ammo_amount = self.WEP_AMMO(WEP_VORTEX) >= WEP_CVAR_PRI(vortex, ammo);
+                       ammo_amount = self.WEP_AMMO(VORTEX) >= WEP_CVAR_PRI(vortex, ammo);
                        ammo_amount += (autocvar_g_balance_vortex_reload_ammo && self.(weapon_load[WEP_VORTEX]) >= WEP_CVAR_PRI(vortex, ammo));
                        return ammo_amount;
                }
@@ -261,7 +261,7 @@ float W_Vortex(float req)
                        if(WEP_CVAR(vortex, secondary))
                        {
                                // don't allow charging if we don't have enough ammo
-                               ammo_amount = self.WEP_AMMO(WEP_VORTEX) >= WEP_CVAR_SEC(vortex, ammo);
+                               ammo_amount = self.WEP_AMMO(VORTEX) >= WEP_CVAR_SEC(vortex, ammo);
                                ammo_amount += self.(weapon_load[WEP_VORTEX]) >= WEP_CVAR_SEC(vortex, ammo);
                                return ammo_amount;
                        }
index e0a4a5b7e59f5e20759a5001117a6fc35c3c6fd0..3f45eb5a94a2f359f505f0cd9004461e8a433166 100644 (file)
@@ -89,7 +89,7 @@ float GetAmmoStat(.float ammotype);
 
 // other useful macros
 #define WEP_ACTION(wpn,wrequest) (get_weaponinfo(wpn)).weapon_func(wrequest)
-#define WEP_AMMO(wpn) ((get_weaponinfo(wpn)).ammo_field)
+#define WEP_AMMO(wpn) ((get_weaponinfo(WEP_##wpn)).ammo_field)
 
 
 // ======================