Merge pull request #1580 from DanielOaks/zombie-pitch

Make zombie pitches more uniform, fix unused variable
This commit is contained in:
alfred-valve 2014-12-30 19:38:09 -08:00
commit 5d761709a3

View file

@ -169,16 +169,18 @@ void CZombie :: AlertSound( void )
void CZombie :: IdleSound( void )
{
int pitch = 95 + RANDOM_LONG(0,9);
int pitch = 100 + RANDOM_LONG(-5,5);
// Play a random idle sound
EMIT_SOUND_DYN ( ENT(pev), CHAN_VOICE, pIdleSounds[ RANDOM_LONG(0,ARRAYSIZE(pIdleSounds)-1) ], 1.0, ATTN_NORM, 0, 100 + RANDOM_LONG(-5,5) );
EMIT_SOUND_DYN ( ENT(pev), CHAN_VOICE, pIdleSounds[ RANDOM_LONG(0,ARRAYSIZE(pIdleSounds)-1) ], 1.0, ATTN_NORM, 0, pitch );
}
void CZombie :: AttackSound( void )
{
int pitch = 100 + RANDOM_LONG(-5,5);
// Play a random attack sound
EMIT_SOUND_DYN ( ENT(pev), CHAN_VOICE, pAttackSounds[ RANDOM_LONG(0,ARRAYSIZE(pAttackSounds)-1) ], 1.0, ATTN_NORM, 0, 100 + RANDOM_LONG(-5,5) );
EMIT_SOUND_DYN ( ENT(pev), CHAN_VOICE, pAttackSounds[ RANDOM_LONG(0,ARRAYSIZE(pAttackSounds)-1) ], 1.0, ATTN_NORM, 0, pitch );
}