#ifdef REGISTER_MONSTER
REGISTER_MONSTER(
-/* MON_##id */ MAGE,
-/* function */ m_mage,
+/* MON_##id */ MAGE,
+/* function */ m_mage,
/* spawnflags */ MON_FLAG_MELEE | MON_FLAG_RANGED,
/* mins,maxs */ '-36 -36 -24', '36 36 50',
-/* model */ "mage.dpm",
-/* netname */ "mage",
-/* fullname */ _("Mage")
+/* model */ "mage.dpm",
+/* netname */ "mage",
+/* fullname */ _("Mage")
);
#else
return FALSE;
if(DIFF_TEAM(e, self) && e != self.monster_owner)
return FALSE;
- if(e.frozen)
+ if(e.freezetag_frozen)
return FALSE;
if(!IS_PLAYER(e))
- return (e.flags & FL_MONSTER && e.health < e.max_health);
+ return ((e.flags & FL_MONSTER) && e.health < e.max_health);
if(e.items & IT_INVINCIBLE)
return FALSE;
self.realowner.mage_spike = world;
pointparticles(particleeffectnum("explosion_small"), self.origin, '0 0 0', 1);
- RadiusDamage (self, self.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, 0, DEATH_MONSTER_MAGE, other);
+ RadiusDamage (self, self.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, other);
remove (self);
}
self.wait = bound((autocvar_g_monster_mage_attack_spike_smart_trace_min), vlen(self.origin - trace_endpos), self.wait = (autocvar_g_monster_mage_attack_spike_smart_trace_max));
// Calc how important it is that we turn and add this to the desierd (enemy) dir.
- desireddir = normalize(((trace_plane_normal * (1 - trace_fraction)) + (desireddir * trace_fraction)) * 0.5);
+ desireddir = normalize(((trace_plane_normal * (1 - trace_fraction)) + (desireddir * trace_fraction)) * 0.5);
}
newdir = normalize(olddir + desireddir * turnrate); // take the average of the 2 directions; not the best method but simple & easy
{
pointparticles(particleeffectnum("healing_fx"), head.origin, '0 0 0', 1);
head.health = bound(0, head.health + (autocvar_g_monster_mage_heal_allies), head.max_health);
- WaypointSprite_UpdateHealth(head.sprite, head.health);
+ if(!(head.spawnflags & MONSTERFLAG_INVINCIBLE))
+ WaypointSprite_UpdateHealth(head.sprite, head.health);
}
}
void mage_push()
{
sound(self, CH_SHOTS, "weapons/tagexp1.wav", 1, ATTEN_NORM);
- RadiusDamage (self, self, (autocvar_g_monster_mage_attack_push_damage), (autocvar_g_monster_mage_attack_push_damage), (autocvar_g_monster_mage_attack_push_radius), world, (autocvar_g_monster_mage_attack_push_force), DEATH_MONSTER_MAGE, self.enemy);
+ RadiusDamage (self, self, (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, self.enemy);
pointparticles(particleeffectnum("TE_EXPLOSION"), self.origin, '0 0 0', 1);
self.frame = mage_anim_attack;
{
self.classname = "monster_mage";
- self.monster_spawnfunc = spawnfunc_monster_mage;
-
- if(Monster_CheckAppearFlags(self))
- return;
-
- if(!monster_initialize(MON_MAGE, FALSE)) { remove(self); return; }
+ if(!monster_initialize(MON_MAGE)) { remove(self); return; }
}
// compatibility with old spawns
}
case MR_PRECACHE:
{
- precache_model ("models/monsters/mage.dpm");
+ precache_model("models/monsters/mage.dpm");
precache_sound ("weapons/grenade_impact.wav");
precache_sound ("weapons/tagexp1.wav");
return TRUE;
{
case MR_PRECACHE:
{
- precache_model ("models/monsters/mage.dpm");
return TRUE;
}
}