precache_sound(e.msound_pain);
}
+void monster_setupsounds(string mon)
+{
+ if(self.msound_idle == "") self.msound_idle = strzone(strcat("monsters/", mon, "_idle.wav"));
+ if(self.msound_death == "") self.msound_death = strzone(strcat("monsters/", mon, "_death.wav"));
+ if(self.msound_pain == "") self.msound_pain = strzone(strcat("monsters/", mon, "_pain.wav"));
+ if(self.msound_attack_melee == "") self.msound_attack_melee = strzone(strcat("monsters/", mon, "_melee.wav"));
+ if(self.msound_attack_ranged == "") self.msound_attack_ranged = strzone(strcat("monsters/", mon, "_attack.wav"));
+ if(self.msound_sight == "") self.msound_sight = strzone(strcat("monsters/", mon, "_sight.wav"));
+}
+
void monster_melee (entity targ, float damg, float er, float deathtype, float dostop)
{
float bigdmg, dot, rdmg = damg * random();
monsters_setframe(demon_anim_stand);
+ monster_setupsounds("demon");
+
monster_hook_spawn(); // for post-spawn mods
}
self.sprite_height = 20;
monsters_setframe(dog_anim_idle);
+ monster_setupsounds("dog");
+
monster_hook_spawn(); // for post-spawn mods
}
monsters_setframe(enforcer_anim_stop);
+ monster_setupsounds("enforcer");
+
setmodel(self, ENFORCER_MODEL); // for weapon entity
self.weaponentity = spawn();
self.think = fish_think;
self.sprite_height = 20;
+ monster_setupsounds("fish");
+
monster_hook_spawn(); // for post-spawn mods
}
monsters_setframe(hellknight_anim_stand);
+ monster_setupsounds("hellknight");
+
monster_hook_spawn(); // for post-spawn mods
}
monsters_setframe(knight_anim_stand);
+ monster_setupsounds("knight");
+
monster_hook_spawn(); // for post-spawn mods
}
monsters_setframe(ogre_anim_idle);
+ monster_setupsounds("ogre");
+
monster_hook_spawn(); // for post-spawn mods
}
monsters_setframe(shalrath_anim_walk);
+ monster_setupsounds("shalrath");
+
monster_hook_spawn(); // for post-spawn mods
}
monsters_setframe(shambler_anim_stand);
+ monster_setupsounds("shambler");
+
monster_hook_spawn(); // for post-spawn mods
}
monsters_setframe(soldier_anim_draw);
+ monster_setupsounds("soldier");
+
setmodel(self, SOLDIER_MODEL);
RandomSelection_Init();
monsters_setframe(spider_anim_idle);
+ monster_setupsounds("spider");
+
if not(self.spider_type)
self.spider_type = autocvar_g_monster_spider_attack_type;
monsters_setframe(tarbaby_anim_walk);
+ monster_setupsounds("tarbaby");
+
monster_hook_spawn(); // for post-spawn mods
}
self.think = wizard_think;
self.sprite_height = 30;
+ monster_setupsounds("wizard");
+
monster_hook_spawn(); // for post-spawn mods
}
if not(self.monster_respawned)
self.skin = rint(random() * 4);
- // some sounds
- if(self.msound_idle == "") self.msound_idle = "monsters/zombie_idle.wav";
- if(self.msound_death == "") self.msound_death = "monsters/zombie_death.wav";
- if(self.msound_pain == "") self.msound_pain = "monsters/zombie_pain.wav";
- if(self.msound_attack_melee == "") self.msound_attack_melee = "monsters/zombie_melee.wav";
- if(self.msound_attack_ranged == "") self.msound_attack_ranged = "monsters/zombie_attack.wav";
- if(self.msound_sight == "") self.msound_sight = "monsters/zombie_sight.wav";
+ monster_setupsounds("zombie");
monster_hook_spawn(); // for post-spawn mods
}