monster_scientist: Add FallNoise()

This commit is contained in:
Marco Cawthorne 2021-09-17 00:43:12 +02:00
parent 271bddb2db
commit 3cd5af1d19
Signed by: eukara
GPG key ID: C196CD8BA993248A

View file

@ -80,8 +80,17 @@ class monster_scientist:CBaseNPC
virtual int(void) AttackMelee;
virtual void(void) AttackNeedle;
virtual void(void) FallNoise;
};
void
monster_scientist::FallNoise(void)
{
float r = floor(random(3,8)) + 1.0f;
sound(this, CHAN_VOICE, sprintf("scientist/scream%02d.wav", r), 1.0, ATTN_NORM);
}
int
monster_scientist::AttackMelee(void)
{
@ -271,6 +280,12 @@ monster_scientist::monster_scientist(void)
{
spawnflags |= MSF_MULTIPLAYER;
precache_sound("scientist/scream04.wav");
precache_sound("scientist/scream05.wav");
precache_sound("scientist/scream06.wav");
precache_sound("scientist/scream07.wav");
precache_sound("scientist/scream08.wav");
Sound_Precache("monster_scientist.die");
Sound_Precache("monster_scientist.pain");