self.movetype = MOVETYPE_NONE;
}
-void W_Hook_Damage(entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force)
-{SELFPARAM();
- if(self.health <= 0)
+void W_Hook_Damage(entity this, entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force)
+{
+ if(this.health <= 0)
return;
- if(!W_CheckProjectileDamage(inflictor.realowner, self.realowner, deathtype, -1)) // no exceptions
+ if(!W_CheckProjectileDamage(inflictor.realowner, this.realowner, deathtype, -1)) // no exceptions
return; // g_projectiles_damage says to halt
- self.health = self.health - damage;
+ this.health = this.health - damage;
- if(self.health <= 0)
- W_PrepareExplosionByDamage(self.realowner, W_Hook_Explode2);
+ if(this.health <= 0)
+ WITH(entity, self, this, W_PrepareExplosionByDamage(this.realowner, W_Hook_Explode2));
}
void W_Hook_Touch2()
#endif
#ifdef CSQC
-#include "../../../lib/csqcmodel/interpolate.qh"
-#include "../../../lib/warpzone/common.qh"
+#include <lib/csqcmodel/interpolate.qh>
+#include <lib/warpzone/common.qh>
void Draw_CylindricLine(vector from, vector to, float thickness, string texture, float aspect, float shift, vector rgb, float theAlpha, float drawflag, vector vieworg);