]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/weapons/weapon/hmg.qc
Weapons: remove WEP_ACTION
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / weapons / weapon / hmg.qc
index 881f513807d8f00bc46520094ec91a5cfd6f003c..aae7d7792ace988a7f49b2110c393a1e932c48f9 100644 (file)
@@ -53,7 +53,8 @@ void W_HeavyMachineGun_Attack_Auto(Weapon thiswep, bool fire1, bool fire2)
                return;
        }
 
-       if(!_WEP_ACTION(self.weapon, WR_CHECKAMMO1))
+       Weapon w = get_weaponinfo(self.weapon);
+       if(!w.wr_checkammo1(w))
        if(!(self.items & IT_UNLIMITED_WEAPON_AMMO))
        {
                W_SwitchWeapon_Force(self, w_getbestweapon(self));
@@ -99,9 +100,10 @@ void W_HeavyMachineGun_Attack_Auto(Weapon thiswep, bool fire1, bool fire2)
                }
                METHOD(HeavyMachineGun, wr_think, bool(entity thiswep, bool fire1, bool fire2))
                {
-                       if(WEP_CVAR(hmg, reload_ammo) && self.clip_load < WEP_CVAR(hmg, ammo)) // forced reload
-                               _WEP_ACTION(self.weapon, WR_RELOAD);
-                       else
+                       if(WEP_CVAR(hmg, reload_ammo) && self.clip_load < WEP_CVAR(hmg, ammo)) { // forced reload
+                               Weapon w = get_weaponinfo(self.weapon);
+                               w.wr_reload(w);
+                       } else
                        {
                                if (fire1)
                                if (weapon_prepareattack(false, 0))