diff --git a/dlls/leech.cpp b/dlls/leech.cpp index dbdb11b45..891b3f1d1 100644 --- a/dlls/leech.cpp +++ b/dlls/leech.cpp @@ -278,7 +278,7 @@ void CLeech::AttackSound() { if (gpGlobals->time > m_attackSoundTime) { - EMIT_SOUND_DYN(ENT(pev), CHAN_VOICE, pAttackSounds[RANDOM_LONG(0, ARRAYSIZE(pAttackSounds) - 1)], 1.0, ATTN_NORM, 0, PITCH_NORM); + EMIT_SOUND_DYN(ENT(pev), CHAN_VOICE, RANDOM_SOUND_ARRAY(pAttackSounds), 1.0, ATTN_NORM, 0, PITCH_NORM); m_attackSoundTime = gpGlobals->time + 0.5; } } @@ -286,21 +286,17 @@ void CLeech::AttackSound() void CLeech::AlertSound() { - EMIT_SOUND_DYN(ENT(pev), CHAN_VOICE, pAlertSounds[RANDOM_LONG(0, ARRAYSIZE(pAlertSounds) - 1)], 1.0, ATTN_NORM * 0.5, 0, PITCH_NORM); + EMIT_SOUND_DYN(ENT(pev), CHAN_VOICE, RANDOM_SOUND_ARRAY(pAlertSounds), 1.0, ATTN_NORM * 0.5, 0, PITCH_NORM); } void CLeech::Precache() { - int i; - //PRECACHE_MODEL("models/icky.mdl"); PRECACHE_MODEL("models/leech.mdl"); - for (i = 0; i < ARRAYSIZE(pAttackSounds); i++) - PRECACHE_SOUND((char*)pAttackSounds[i]); - for (i = 0; i < ARRAYSIZE(pAlertSounds); i++) - PRECACHE_SOUND((char*)pAlertSounds[i]); + PRECACHE_SOUND_ARRAY(pAttackSounds); + PRECACHE_SOUND_ARRAY(pAlertSounds); }