W_DecreaseAmmo(thiswep, self, WEP_CVAR(devastator, ammo));
- W_SetupShot_ProjectileSize(self, '-3 -3 -3', '3 3 3', false, 5, SND(ROCKET_FIRE), CH_WEAPON_A, WEP_CVAR(devastator, damage));
+ W_SetupShot_ProjectileSize(self, '-3 -3 -3', '3 3 3', false, 5, SND_ROCKET_FIRE, CH_WEAPON_A, WEP_CVAR(devastator, damage));
Send_Effect(EFFECT_ROCKET_MUZZLEFLASH, w_shotorg, w_shotdir * 1000, 1);
missile = WarpZone_RefSys_SpawnSameRefSys(self);
METHOD(Devastator, wr_aim, void(entity thiswep))
{
// aim and decide to fire if appropriate
- PHYS_INPUT_BUTTON_ATCK(self) = bot_aim(WEP_CVAR(devastator, speed), 0, WEP_CVAR(devastator, lifetime), false);
+ PHYS_INPUT_BUTTON_ATCK(self) = bot_aim(self, WEP_CVAR(devastator, speed), 0, WEP_CVAR(devastator, lifetime), false);
if(skill >= 2) // skill 0 and 1 bots won't detonate rockets!
{
// decide whether to detonate rockets
#else
METHOD(Devastator, wr_aim, void(entity thiswep))
{
+ SELFPARAM();
// aim and decide to fire if appropriate
- PHYS_INPUT_BUTTON_ATCK(self) = bot_aim(WEP_CVAR(devastator, speed), 0, WEP_CVAR(devastator, lifetime), false);
+ PHYS_INPUT_BUTTON_ATCK(self) = bot_aim(self, WEP_CVAR(devastator, speed), 0, WEP_CVAR(devastator, lifetime), false);
if(skill >= 2) // skill 0 and 1 bots won't detonate rockets!
{
// decide whether to detonate rockets
selfdamage = selfdamage + d;
else if(targ.team == self.team && teamplay)
teamdamage = teamdamage + d;
- else if(bot_shouldattack(targ))
+ else if(bot_shouldattack(self, targ))
enemydamage = enemydamage + d;
targ = targ.chain;
}
}
METHOD(Devastator, wr_setup, void(entity thiswep))
{
+ SELFPARAM();
self.rl_release = 1;
}
METHOD(Devastator, wr_checkammo1, bool(entity thiswep))
{
+ SELFPARAM();
#if 0
// don't switch while guiding a missile
if(ATTACK_FINISHED(self, slot) <= time || PS(self).m_weapon != WEP_DEVASTATOR)
}
METHOD(Devastator, wr_resetplayer, void(entity thiswep))
{
+ SELFPARAM();
self.lastrocket = NULL; // stop rocket guiding, no revenge from the grave!
self.rl_release = 0;
}
METHOD(Devastator, wr_reload, void(entity thiswep, entity actor, .entity weaponentity))
{
- W_Reload(self, WEP_CVAR(devastator, ammo), SND(RELOAD));
+ SELFPARAM();
+ W_Reload(self, WEP_CVAR(devastator, ammo), SND_RELOAD);
}
METHOD(Devastator, wr_suicidemessage, Notification(entity thiswep))
{
METHOD(Devastator, wr_impacteffect, void(entity thiswep))
{
+ SELFPARAM();
vector org2;
org2 = w_org + w_backoff * 12;
pointparticles(EFFECT_ROCKET_EXPLODE, org2, '0 0 0', 1);