bool M_Mage_Defend_Heal_Check(entity this, entity targ)
{
- if(targ == world)
+ if(targ == NULL)
return false;
if(targ.health <= 0)
return false;
sound(this, CH_SHOTS, SND_GRENADE_IMPACT, VOL_BASE, ATTEN_NORM);
- this.realowner.mage_spike = world;
+ this.realowner.mage_spike = NULL;
Send_Effect(EFFECT_EXPLOSION_SMALL, this.origin, '0 0 0', 1);
- RadiusDamage (this, this.realowner, (autocvar_g_monster_mage_attack_spike_damage), (autocvar_g_monster_mage_attack_spike_damage) * 0.5, (autocvar_g_monster_mage_attack_spike_radius), world, world, 0, DEATH_MONSTER_MAGE.m_id, other);
+ RadiusDamage (this, this.realowner, (autocvar_g_monster_mage_attack_spike_damage), (autocvar_g_monster_mage_attack_spike_damage) * 0.5, (autocvar_g_monster_mage_attack_spike_radius), NULL, NULL, 0, DEATH_MONSTER_MAGE.m_id, other);
remove (this);
}
-void M_Mage_Attack_Spike_Touch()
+void M_Mage_Attack_Spike_Touch(entity this)
{
- SELFPARAM();
- PROJECTILE_TOUCH;
+ PROJECTILE_TOUCH(this);
- M_Mage_Attack_Spike_Explode(self);
+ M_Mage_Attack_Spike_Explode(this);
}
.float wait;
// copied from W_Seeker_Think
-void M_Mage_Attack_Spike_Think()
-{SELFPARAM();
+void M_Mage_Attack_Spike_Think(entity this)
+{
if (time > this.ltime || (this.enemy && this.enemy.health <= 0) || this.owner.health <= 0) {
this.projectiledeathtype |= HITTYPE_SPLASH;
M_Mage_Attack_Spike_Explode(this);
spd + (autocvar_g_monster_mage_attack_spike_accel) * frametime
);
- if (this.enemy != world)
+ if (this.enemy != NULL)
if (this.enemy.takedamage != DAMAGE_AIM || IS_DEAD(this.enemy))
- this.enemy = world;
+ this.enemy = NULL;
- if (this.enemy != world)
+ if (this.enemy != NULL)
{
entity e = this.enemy;
vector eorg = 0.5 * (e.absmin + e.absmax);
void M_Mage_Attack_Push(entity this)
{
sound(this, CH_SHOTS, SND_TAGEXP1, 1, ATTEN_NORM);
- RadiusDamage (this, this, (autocvar_g_monster_mage_attack_push_damage), (autocvar_g_monster_mage_attack_push_damage), (autocvar_g_monster_mage_attack_push_radius), world, world, (autocvar_g_monster_mage_attack_push_force), DEATH_MONSTER_MAGE.m_id, this.enemy);
+ RadiusDamage (this, this, (autocvar_g_monster_mage_attack_push_damage), (autocvar_g_monster_mage_attack_push_damage), (autocvar_g_monster_mage_attack_push_radius), NULL, NULL, (autocvar_g_monster_mage_attack_push_force), DEATH_MONSTER_MAGE.m_id, this.enemy);
Send_Effect(EFFECT_TE_EXPLOSION, this.origin, '0 0 0', 1);
setanim(this, this.anim_shoot, true, true, true);
return true;
}
-METHOD(Mage, mr_pain, bool(Mage this, entity actor))
+METHOD(Mage, mr_pain, float(Mage this, entity actor, float damage_take, entity attacker, float deathtype))
{
TC(Mage, this);
- return true;
+ return damage_take;
}
METHOD(Mage, mr_death, bool(Mage this, entity actor))