remove(self);
}
-void W_Hagar_Damage(entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force)
-{SELFPARAM();
- if(self.health <= 0)
+void W_Hagar_Damage(entity this, entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force)
+{
+ if(this.health <= 0)
return;
- float is_linkexplode = ( ((inflictor.owner != world) ? (inflictor.owner == self.owner) : true)
+ float is_linkexplode = ( ((inflictor.owner != world) ? (inflictor.owner == this.owner) : true)
&& (inflictor.projectiledeathtype & HITTYPE_SECONDARY)
- && (self.projectiledeathtype & HITTYPE_SECONDARY));
+ && (this.projectiledeathtype & HITTYPE_SECONDARY));
if(is_linkexplode)
is_linkexplode = (is_linkexplode && WEP_CVAR_SEC(hagar, load_linkexplode));
else
is_linkexplode = -1; // not secondary load, so continue as normal without exception.
- if(!W_CheckProjectileDamage(inflictor.realowner, self.realowner, deathtype, is_linkexplode))
+ if(!W_CheckProjectileDamage(inflictor.realowner, this.realowner, deathtype, is_linkexplode))
return; // g_projectiles_damage says to halt
- self.health = self.health - damage;
- self.angles = vectoangles(self.velocity);
+ this.health = this.health - damage;
+ this.angles = vectoangles(this.velocity);
- if(self.health <= 0)
- W_PrepareExplosionByDamage(attacker, self.think);
+ if(this.health <= 0)
+ WITH(entity, self, this, W_PrepareExplosionByDamage(attacker, this.think));
}
void W_Hagar_Touch()
if(loadable_secondary)
W_Hagar_Attack2_Load(thiswep, weaponentity); // must always run each frame
if(autocvar_g_balance_hagar_reload_ammo && actor.clip_load < min(WEP_CVAR_PRI(hagar, ammo), WEP_CVAR_SEC(hagar, ammo))) { // forced reload
- thiswep.wr_reload(thiswep);
+ thiswep.wr_reload(thiswep, actor, weaponentity);
} else if((fire & 1) && !actor.hagar_load && !actor.hagar_loadblock) // not while secondary is loaded or awaiting reset
{
if(weapon_prepareattack(thiswep, actor, weaponentity, false, WEP_CVAR_PRI(hagar, refire)))
if(self.hagar_load && WEP_CVAR_SEC(hagar, load_releasedeath))
W_Hagar_Attack2_Load_Release(weaponentity);
}
- METHOD(Hagar, wr_reload, void(entity thiswep))
+ METHOD(Hagar, wr_reload, void(entity thiswep, entity actor, .entity weaponentity))
{
if(!self.hagar_load) // require releasing loaded rockets first
W_Reload(self, min(WEP_CVAR_PRI(hagar, ammo), WEP_CVAR_SEC(hagar, ammo)), SND(RELOAD));
}
- METHOD(Hagar, wr_suicidemessage, int(entity thiswep))
+ METHOD(Hagar, wr_suicidemessage, Notification(entity thiswep))
{
return WEAPON_HAGAR_SUICIDE;
}
- METHOD(Hagar, wr_killmessage, int(entity thiswep))
+ METHOD(Hagar, wr_killmessage, Notification(entity thiswep))
{
if(w_deathtype & HITTYPE_SECONDARY)
return WEAPON_HAGAR_MURDER_BURST;