void spawnfunc_weapon_hmg() { weapon_defaultspawnfunc(WEP_HMG.m_id); }
-void W_HeavyMachineGun_Attack_Auto()
+void W_HeavyMachineGun_Attack_Auto(Weapon thiswep, bool fire1, bool fire2)
{SELFPARAM();
if (!self.BUTTON_ATCK)
{
- w_ready();
+ w_ready(thiswep, fire1, fire2);
return;
}
if(!(self.items & IT_UNLIMITED_WEAPON_AMMO))
{
W_SwitchWeapon_Force(self, w_getbestweapon(self));
- w_ready();
+ w_ready(thiswep, fire1, fire2);
return;
}
- W_DecreaseAmmo(WEP_CVAR(hmg, ammo));
+ W_DecreaseAmmo(WEP_HMG, WEP_CVAR(hmg, ammo));
W_SetupShot (self, true, 0, SND(UZI_FIRE), CH_WEAPON_A, WEP_CVAR(hmg, damage));
return true;
}
- METHOD(HeavyMachineGun, wr_think, bool(entity thiswep))
+ 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 (self.BUTTON_ATCK)
+ if (fire1)
if (weapon_prepareattack(0, 0))
{
self.misc_bulletcounter = 0;
- W_HeavyMachineGun_Attack_Auto();
+ W_HeavyMachineGun_Attack_Auto(thiswep, fire1, fire2);
}
}