}
// weapon frames
-void W_HLAC_Attack_Frame(Weapon thiswep, entity actor, bool fire1, bool fire2)
+void W_HLAC_Attack_Frame(Weapon thiswep, entity actor, int fire)
{
if(actor.weapon != actor.switchweapon) // abort immediately if switching
{
- w_ready(thiswep, actor, fire1, fire2);
+ w_ready(thiswep, actor, fire);
return;
}
if(!(actor.items & IT_UNLIMITED_WEAPON_AMMO))
{
W_SwitchWeapon_Force(actor, w_getbestweapon(actor));
- w_ready(thiswep, actor, fire1, fire2);
+ w_ready(thiswep, actor, fire);
return;
}
{
self.BUTTON_ATCK = bot_aim(WEP_CVAR_PRI(hlac, speed), 0, WEP_CVAR_PRI(hlac, lifetime), false);
}
- METHOD(HLAC, wr_think, void(entity thiswep, entity actor, bool fire1, bool fire2))
+ METHOD(HLAC, wr_think, void(entity thiswep, entity actor, int fire))
{
if(autocvar_g_balance_hlac_reload_ammo && actor.clip_load < min(WEP_CVAR_PRI(hlac, ammo), WEP_CVAR_SEC(hlac, ammo))) { // forced reload
Weapon w = get_weaponinfo(actor.weapon);
w.wr_reload(w);
- } else if(fire1)
+ } else if(fire & 1)
{
if(weapon_prepareattack(thiswep, actor, false, WEP_CVAR_PRI(hlac, refire)))
{
}
}
- else if(fire2 && WEP_CVAR(hlac, secondary))
+ else if((fire & 2) && WEP_CVAR(hlac, secondary))
{
if(weapon_prepareattack(thiswep, actor, true, WEP_CVAR_SEC(hlac, refire)))
{