From c98a1f0a595ea72567554c2d9bae1b87caa7ccb8 Mon Sep 17 00:00:00 2001 From: trml Date: Tue, 25 Aug 2020 22:45:23 +0200 Subject: [PATCH] Only send pain sound in freeze if fire was released --- src/game/server/entities/character.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/game/server/entities/character.cpp b/src/game/server/entities/character.cpp index cd2d87d5a..77bbd5f61 100644 --- a/src/game/server/entities/character.cpp +++ b/src/game/server/entities/character.cpp @@ -367,7 +367,7 @@ void CCharacter::FireWeapon() if(CountInput(m_LatestPrevInput.m_Fire, m_LatestInput.m_Fire).m_Presses) WillFire = true; - if(FullAuto && (m_LatestInput.m_Fire&1) && m_aWeapons[m_Core.m_ActiveWeapon].m_Ammo && !m_FreezeTime) + if(FullAuto && (m_LatestInput.m_Fire&1) && m_aWeapons[m_Core.m_ActiveWeapon].m_Ammo) WillFire = true; if(!WillFire) @@ -376,7 +376,7 @@ void CCharacter::FireWeapon() if (m_FreezeTime) { // Timer stuff to avoid shrieking orchestra caused by unfreeze-plasma - if(m_PainSoundTimer<=0) + if(m_PainSoundTimer<=0 && !(m_LatestPrevInput.m_Fire&1)) { m_PainSoundTimer = 1 * Server()->TickSpeed(); GameServer()->CreateSound(m_Pos, SOUND_PLAYER_PAIN_LONG, Teams()->TeamMask(Team(), -1, m_pPlayer->GetCID()));