-//TAG: shambler
-//death sound/monsters/shambler/death 0
-sight sound/monsters/shambler/sight 0
-//ranged sound/monsters/shambler/ranged 0
-//melee sound/monsters/shambler/melee 0
-//pain sound/monsters/shambler/pain 0
-//spawn sound/monsters/shambler/spawn 0
-idle sound/monsters/shambler/idle 2
+//TAG: golem
+//death sound/monsters/golem/death 0
+sight sound/monsters/golem/sight 0
+//ranged sound/monsters/golem/ranged 0
+//melee sound/monsters/golem/melee 0
+//pain sound/monsters/golem/pain 0
+//spawn sound/monsters/golem/spawn 0
+idle sound/monsters/golem/idle 2
// copied from W_Seeker_Think
void M_Mage_Attack_Spike_Think(entity this)
{
- if (time > this.ltime || (this.enemy && GetResource(this.enemy, RES_HEALTH) <= 0) || GetResource(this.owner, RES_HEALTH) <= 0) {
+ if (time > this.ltime || (this.enemy && GetResource(this.enemy, RES_HEALTH) <= 0) || !this.owner || GetResource(this.owner, RES_HEALTH) <= 0) {
this.projectiledeathtype |= HITTYPE_SPLASH;
M_Mage_Attack_Spike_Explode(this, NULL);
}
void M_Mage_Attack_Teleport(entity this, entity targ)
{
if(!targ) return;
- if(vdist(targ.origin - this.origin, >, 1500)) return;
+ if(vdist(targ.origin - this.origin, >, autocvar_g_monster_mage_attack_teleport_random_range)) return;
if(autocvar_g_monster_mage_attack_teleport_random && random() <= autocvar_g_monster_mage_attack_teleport_random)
{
if((!this || !targ)
|| (!this.monster_attackfunc)
+ || (game_stopped)
|| (time < this.attack_finished_single[slot])
|| ((autocvar_g_monsters_target_infront || (this.spawnflags & MONSTERFLAG_INFRONT)) && !monster_facing(this, targ))
) { return; }