if(vlen(targ.origin - e.origin) <= e.attack_range)
if(e.monster_attackfunc(MONSTER_ATTACK_MELEE))
{
- //monster_sound(e.msound_attack_melee, 0, FALSE);
MonsterSound(monstersound_melee, 0, FALSE, CH_VOICE);
return;
}
if(vlen(targ.origin - e.origin) > e.attack_range)
if(e.monster_attackfunc(MONSTER_ATTACK_RANGED))
{
- //monster_sound(e.msound_attack_ranged, 0, FALSE);
MonsterSound(monstersound_ranged, 0, FALSE, CH_VOICE);
return;
}
self.enemy = FindTarget(self);
if(self.enemy)
MonsterSound(monstersound_sight, 0, FALSE, CH_VOICE);
- //monster_sound(self.msound_sight, 0, FALSE);
}
self.last_enemycheck = time + 0.5;
if not(self.enemy)
MonsterSound(monstersound_idle, 5, TRUE, CH_VOICE);
- //monster_sound(self.msound_idle, 5, TRUE);
if(self.state != MONSTER_STATE_ATTACK_LEAP && self.state != MONSTER_STATE_ATTACK_MELEE)
self.steerto = steerlib_attract2(self.moveto, 0.5, 500, 0.95);
monster_dropitem();
MonsterSound(monstersound_death, 0, FALSE, CH_VOICE);
- //monster_sound(self.msound_death, 0, FALSE);
if(!(self.spawnflags & MONSTERFLAG_SPAWNED) && !self.monster_respawned)
monsters_killed += 1;
if(teamplay)
self.monster_attack = TRUE; // we can have monster enemies in team games
-
- //monster_sound(self.msound_spawn, 0, FALSE);
+
MonsterSound(monstersound_spawn, 0, FALSE, CH_VOICE);
self.think = monster_think;
// monster sounds
// copied from player sounds
+.float msound_delay; // temporary antilag system
#define ALLMONSTERSOUNDS \
_MSOUND(death) \
_MSOUND(sight) \
const float MONSTERFLAG_MINIBOSS = 64; // monster spawns as mini-boss (also has a chance of naturally becoming one)
const float MONSTERFLAG_SPAWNED = 16384; // flag for spawned monsters
-.float msound_delay; // restricts some monster sounds
-.string msound_idle;
-.string msound_death;
-.string msound_attack_melee;
-.string msound_attack_ranged;
-.string msound_spawn;
-.string msound_sight;
-.string msound_pain;
-
.void() monster_spawnfunc;
.float monster_movestate; // used to tell what the monster is currently doing