.string oldtarget2;
.float lastshielded;
-const float MONSTER_RESPAWN_SPAWNPOINT = 10; // re-spawn at original spawn point
-const float MONSTER_RESPAWN_DEATHPOINT = 11; // re-spawn where we died
+const float MONSTER_RESPAWN_DEATHPOINT = 8; // re-spawn where we died
.float monster_respawned; // used to make sure we're not recounting respawned monster stats
const float MONSTERSKILL_NOTINSANE = 2048; // monster will not spawn on skill 5
const float MONSTERSKILL_NOTNIGHTMARE = 4096; // monster will not spawn on skill >= 6
-// legacy flags
-const float MONSTERFLAG_NORESPAWN = 2;
-const float MONSTERFLAG_MINIBOSS = 64; // monster spawns as mini-boss (also has a chance of naturally becoming one)
-const float MONSTERFLAG_NOWANDER = 128; // disable wandering around (currently unused)
-const float MONSTERFLAG_APPEAR = 256; // delay spawn until triggered
+// new flags
+const float MONSTERFLAG_MINIBOSS = 1; // monster spawns as mini-boss (also has a chance of naturally becoming one)
+const float MONSTERFLAG_APPEAR = 2; // delay spawn until triggered
+const float MONSTERFLAG_NORESPAWN = 4;
const float MONSTERFLAG_SPAWNED = 512; // flag for spawned monsters
.float msound_delay; // restricts some monster sounds
void() shalrath_shield;
void() shalrath_shield_die;
-void shalrath_think ()
+void shalrath_think()
{
entity head;
float friend_needshelp = FALSE;
monster_move(autocvar_g_monster_shalrath_speed, autocvar_g_monster_shalrath_speed, 50, shalrath_anim_walk, shalrath_anim_run, shalrath_anim_idle);
}
-void shalrath_attack ()
+void shalrath_attack()
{
monsters_setframe(shalrath_anim_attack);
self.delay = time + 0.2;
self.monster_delayedattack = ShalMissile;
}
-void shalrathattack_melee ()
+void shalrathattack_melee()
{
monster_melee(self.enemy, autocvar_g_monster_shalrath_attack_melee_damage, 0.3, DEATH_MONSTER_MAGE, TRUE);
self.monster_delayedattack = func_null;
}
-void shalrath_attack_melee ()
+void shalrath_attack_melee()
{
self.monster_delayedattack = shalrathattack_melee;
self.delay = time + 0.2;
self.attack_finished_single = time + 1.5;
}
-float shal_missile ()
+float shal_missile()
{
if(random() < autocvar_g_monster_shalrath_attack_grenade_chance / 100)
{
return TRUE;
}
-void ShalHome ()
+void ShalHome()
{
local vector dir = '0 0 0', vtemp = self.enemy.origin + '0 0 10';
self.think = ShalHome;
}
-void shal_spike_explode ()
+void shal_spike_explode()
{
self.event_damage = func_null;
shal_spike_explode();
}
-void ShalMissile ()
+void ShalMissile()
{
local entity missile = world;
local vector dir = '0 0 0';
CSQCProjectile(missile, TRUE, PROJECTILE_VORE_SPIKE, TRUE);
}
-float ShalrathCheckAttack ()
+float ShalrathCheckAttack()
{
vector spot1 = '0 0 0', spot2 = '0 0 0';
self.armorvalue = autocvar_g_monster_shalrath_shield_blockpercent / 100;
}
-void shalrath_die ()
+void shalrath_die()
{
Monster_CheckDropCvars ("shalrath");
monster_hook_death(); // for post-death mods
}
-void shalrath_spawn ()
+void shalrath_spawn()
{
if not(self.health)
self.health = autocvar_g_monster_shalrath_health;
monster_hook_spawn(); // for post-spawn mods
}
-void spawnfunc_monster_shalrath ()
+void spawnfunc_monster_mage()
{
if not(autocvar_g_monster_shalrath) { remove(self); return; }
}
// compatibility with old spawns
-void spawnfunc_monster_vore () { spawnfunc_monster_shalrath(); }
+void spawnfunc_monster_vore () { spawnfunc_monster_mage(); }
+void spawnfunc_monster_shalrath () { spawnfunc_monster_mage(); }
#endif // SVQC
monster_hook_spawn(); // for post-spawn mods
}
-void spawnfunc_monster_soldier ()
+void spawnfunc_monster_marine()
{
if not(autocvar_g_monster_soldier) { remove(self); return; }
}
// compatibility with old spawns
-void spawnfunc_monster_army () { spawnfunc_monster_soldier(); }
+void spawnfunc_monster_army () { spawnfunc_monster_marine(); }
+void spawnfunc_monster_soldier () { spawnfunc_monster_marine(); }
#endif // SVQC