]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/weapons/weapon/hagar.qc
Notifications: strong references
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / weapons / weapon / hagar.qc
index 611097e90d02c8cb712dc781869d69ce6c9c8b70..505a656ec8c9866df0b0b8e5e691b7147dc76f14 100644 (file)
@@ -79,28 +79,28 @@ void W_Hagar_Explode2()
        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()
@@ -478,11 +478,11 @@ void W_Hagar_Attack2_Load(Weapon thiswep, .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;