From 6938f7e10ee4ad47180cf8aabf4b3dfb5a92cb4b Mon Sep 17 00:00:00 2001 From: Roman Chistokhodov Date: Sat, 16 Sep 2023 13:23:11 +0300 Subject: [PATCH] Fix sporelauncher not playing a pet sound. Set idle anim chances same as in opfor (#391) --- dlls/gearbox/sporelauncher.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/dlls/gearbox/sporelauncher.cpp b/dlls/gearbox/sporelauncher.cpp index 9a2d59bd..103f2952 100644 --- a/dlls/gearbox/sporelauncher.cpp +++ b/dlls/gearbox/sporelauncher.cpp @@ -280,7 +280,7 @@ void CSporelauncher::Reload(void) m_fInSpecialReload = 2; // Play reload sound. - EMIT_SOUND_DYN(ENT(m_pPlayer->pev), CHAN_ITEM, "weapons/splauncher_reload.wav", 1, ATTN_NORM, 0, 100); + EMIT_SOUND(m_pPlayer->edict(), CHAN_ITEM, "weapons/splauncher_reload.wav", 0.7f, ATTN_NORM); SendWeaponAnim(SPLAUNCHER_RELOAD_LOAD); @@ -328,12 +328,12 @@ void CSporelauncher::WeaponIdle(void) { int iAnim; float flRand = UTIL_SharedRandomFloat(m_pPlayer->random_seed, 0, 1); - if (flRand <= 0.4) + if (flRand <= 0.75f) { iAnim = SPLAUNCHER_IDLE; m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 2.0f; } - else if (flRand <= 0.8) + else if (flRand <= 0.95f) { iAnim = SPLAUNCHER_IDLE2; m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 4.0f; @@ -342,6 +342,7 @@ void CSporelauncher::WeaponIdle(void) { iAnim = SPLAUNCHER_FIDGET; m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 4.0f; + EMIT_SOUND(m_pPlayer->edict(), CHAN_ITEM, "weapons/splauncher_pet.wav", 0.7f, ATTN_NORM); } SendWeaponAnim(iAnim);