/* crosshair */ ATTRIB(HLAC, w_crosshair_size, float, 0.6);
/* wepimg */ ATTRIB(HLAC, model2, string, "weaponhlac");
/* refname */ ATTRIB(HLAC, netname, string, "hlac");
/* crosshair */ ATTRIB(HLAC, w_crosshair_size, float, 0.6);
/* wepimg */ ATTRIB(HLAC, model2, string, "weaponhlac");
/* refname */ ATTRIB(HLAC, netname, string, "hlac");
-/* wepname */ ATTRIB(HLAC, message, string, _("Heavy Laser Assault Cannon"));
+/* wepname */ ATTRIB(HLAC, m_name, string, _("Heavy Laser Assault Cannon"));
missile.bot_dodge = true;
missile.bot_dodgerating = WEP_CVAR_PRI(hlac, damage);
missile.bot_dodge = true;
missile.bot_dodgerating = WEP_CVAR_PRI(hlac, damage);
W_SetupShot(self, false, 3, SND(LASERGUN_FIRE), CH_WEAPON_A, WEP_CVAR_SEC(hlac, damage));
Send_Effect(EFFECT_BLASTER_MUZZLEFLASH, w_shotorg, w_shotdir * 1000, 1);
W_SetupShot(self, false, 3, SND(LASERGUN_FIRE), CH_WEAPON_A, WEP_CVAR_SEC(hlac, damage));
Send_Effect(EFFECT_BLASTER_MUZZLEFLASH, w_shotorg, w_shotdir * 1000, 1);
missile.bot_dodge = true;
missile.bot_dodgerating = WEP_CVAR_SEC(hlac, damage);
missile.bot_dodge = true;
missile.bot_dodgerating = WEP_CVAR_SEC(hlac, damage);
-void W_HLAC_Attack_Frame(Weapon thiswep, entity actor, int slot, int fire)
+void W_HLAC_Attack_Frame(Weapon thiswep, entity actor, .entity weaponentity, int fire)
- w_ready(thiswep, actor, slot, fire);
+ w_ready(thiswep, actor, weaponentity, fire);
- W_SwitchWeapon_Force(actor, w_getbestweapon(actor));
- w_ready(thiswep, actor, slot, fire);
+ W_SwitchWeapon_Force(actor, Weapons_from(w_getbestweapon(actor)));
+ w_ready(thiswep, actor, weaponentity, fire);
ATTACK_FINISHED(actor, slot) = time + WEP_CVAR_PRI(hlac, refire) * W_WeaponRateFactor();
W_HLAC_Attack(WEP_HLAC);
actor.misc_bulletcounter = actor.misc_bulletcounter + 1;
ATTACK_FINISHED(actor, slot) = time + WEP_CVAR_PRI(hlac, refire) * W_WeaponRateFactor();
W_HLAC_Attack(WEP_HLAC);
actor.misc_bulletcounter = actor.misc_bulletcounter + 1;
- weapon_thinkf(actor, slot, WFRAME_FIRE1, WEP_CVAR_PRI(hlac, refire), W_HLAC_Attack_Frame);
+ weapon_thinkf(actor, weaponentity, WFRAME_FIRE1, WEP_CVAR_PRI(hlac, refire), W_HLAC_Attack_Frame);
- weapon_thinkf(actor, slot, WFRAME_FIRE1, WEP_CVAR_PRI(hlac, animtime), w_ready);
+ weapon_thinkf(actor, weaponentity, WFRAME_FIRE1, WEP_CVAR_PRI(hlac, animtime), w_ready);
{
self.BUTTON_ATCK = bot_aim(WEP_CVAR_PRI(hlac, speed), 0, WEP_CVAR_PRI(hlac, lifetime), false);
}
{
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, int slot, int fire))
+ METHOD(HLAC, wr_think, void(entity thiswep, entity actor, .entity weaponentity, 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
{
if(autocvar_g_balance_hlac_reload_ammo && actor.clip_load < min(WEP_CVAR_PRI(hlac, ammo), WEP_CVAR_SEC(hlac, ammo))) { // forced reload
- if(weapon_prepareattack(thiswep, actor, slot, false, WEP_CVAR_PRI(hlac, refire)))
+ if(weapon_prepareattack(thiswep, actor, weaponentity, false, WEP_CVAR_PRI(hlac, refire)))
- weapon_thinkf(actor, slot, WFRAME_FIRE1, WEP_CVAR_PRI(hlac, refire), W_HLAC_Attack_Frame);
+ weapon_thinkf(actor, weaponentity, WFRAME_FIRE1, WEP_CVAR_PRI(hlac, refire), W_HLAC_Attack_Frame);
- if(weapon_prepareattack(thiswep, actor, slot, true, WEP_CVAR_SEC(hlac, refire)))
+ if(weapon_prepareattack(thiswep, actor, weaponentity, true, WEP_CVAR_SEC(hlac, refire)))
- weapon_thinkf(actor, slot, WFRAME_FIRE2, WEP_CVAR_SEC(hlac, animtime), w_ready);
+ weapon_thinkf(actor, weaponentity, WFRAME_FIRE2, WEP_CVAR_SEC(hlac, animtime), w_ready);
- pointparticles(particleeffectnum(EFFECT_BLASTER_IMPACT), org2, w_backoff * 1000, 1);
+ pointparticles(EFFECT_BLASTER_IMPACT, org2, w_backoff * 1000, 1);
if(!w_issilent)
sound(self, CH_SHOTS, SND_LASERIMPACT, VOL_BASE, ATTN_NORM);
}
if(!w_issilent)
sound(self, CH_SHOTS, SND_LASERIMPACT, VOL_BASE, ATTN_NORM);
}