]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/weapons/weapon/hlac.qc
Weapons: remove WEP_ACTION
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / weapons / weapon / hlac.qc
index cb696361c6831970f96c9c34a5d7f80eecc6847f..c7cab6d98fa2cde9616e9bc0e29f86d8c6a06dc7 100644 (file)
@@ -171,7 +171,8 @@ void W_HLAC_Attack_Frame(Weapon thiswep, bool fire1, bool fire2)
 
        if(self.BUTTON_ATCK)
        {
-               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));
@@ -213,9 +214,10 @@ void W_HLAC_Attack2_Frame(Weapon thiswep)
                }
                METHOD(HLAC, wr_think, bool(entity thiswep, bool fire1, bool fire2))
                {
-                       if(autocvar_g_balance_hlac_reload_ammo && self.clip_load < min(WEP_CVAR_PRI(hlac, ammo), WEP_CVAR_SEC(hlac, ammo))) // forced reload
-                               _WEP_ACTION(self.weapon, WR_RELOAD);
-                       else if(fire1)
+                       if(autocvar_g_balance_hlac_reload_ammo && self.clip_load < min(WEP_CVAR_PRI(hlac, ammo), WEP_CVAR_SEC(hlac, ammo))) { // forced reload
+                               Weapon w = get_weaponinfo(self.weapon);
+                               w.wr_reload(w);
+                       } else if(fire1)
                        {
                                if(weapon_prepareattack(false, WEP_CVAR_PRI(hlac, refire)))
                                {