spawnfunc(weapon_hmg) { weapon_defaultspawnfunc(WEP_HMG.m_id); }
-void W_HeavyMachineGun_Attack_Auto(Weapon thiswep, entity actor, int fire)
+void W_HeavyMachineGun_Attack_Auto(Weapon thiswep, entity actor, int slot, int fire)
{
if (!actor.BUTTON_ATCK)
{
- w_ready(thiswep, actor, fire);
+ w_ready(thiswep, actor, slot, fire);
return;
}
if(!(actor.items & IT_UNLIMITED_WEAPON_AMMO))
{
W_SwitchWeapon_Force(actor, w_getbestweapon(actor));
- w_ready(thiswep, actor, fire);
+ w_ready(thiswep, actor, slot, fire);
return;
}
else
self.BUTTON_ATCK2 = bot_aim(1000000, 0, 0.001, false);
}
- METHOD(HeavyMachineGun, wr_think, void(entity thiswep, entity actor, int fire))
+ METHOD(HeavyMachineGun, wr_think, void(entity thiswep, entity actor, int slot, int fire))
{
if(WEP_CVAR(hmg, reload_ammo) && actor.clip_load < WEP_CVAR(hmg, ammo)) { // forced reload
Weapon w = get_weaponinfo(actor.weapon);
if (weapon_prepareattack(thiswep, actor, false, 0))
{
actor.misc_bulletcounter = 0;
- W_HeavyMachineGun_Attack_Auto(thiswep, actor, fire);
+ W_HeavyMachineGun_Attack_Auto(thiswep, actor, slot, fire);
}
}
}