From 189891105137eee3df0e728215f7284b0d1babdd Mon Sep 17 00:00:00 2001 From: Wikot235 <149392035+Wikot235@users.noreply.github.com> Date: Sat, 17 May 2025 16:04:32 +0200 Subject: [PATCH 1/2] Fixed the issue --- sp/src/game/server/hl2/npc_attackchopper.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/sp/src/game/server/hl2/npc_attackchopper.cpp b/sp/src/game/server/hl2/npc_attackchopper.cpp index ac6efb1cbe7..d8f0a0f5b7f 100644 --- a/sp/src/game/server/hl2/npc_attackchopper.cpp +++ b/sp/src/game/server/hl2/npc_attackchopper.cpp @@ -3785,9 +3785,12 @@ void CNPC_AttackHelicopter::Event_Killed( const CTakeDamageInfo &info ) } m_lifeState = LIFE_DYING; - - CSoundEnvelopeController &controller = CSoundEnvelopeController::GetController(); - controller.SoundChangeVolume( m_pGunFiringSound, 0.0, 0.1f ); + + if ( GetSleepState() == AISS_WAITING_FOR_INPUT ) + { + CSoundEnvelopeController& controller = CSoundEnvelopeController::GetController(); + controller.SoundChangeVolume( m_pGunFiringSound, 0.0, 0.1f ); + } if( GetCrashPoint() == NULL ) { From 8acfe0c6c6fb0cc6ba9091974be54c76c4665bf4 Mon Sep 17 00:00:00 2001 From: Wikot235 <149392035+Wikot235@users.noreply.github.com> Date: Sat, 17 May 2025 16:19:15 +0200 Subject: [PATCH 2/2] My last commit wouldn't work, so I fixed it. --- sp/src/game/server/hl2/npc_attackchopper.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sp/src/game/server/hl2/npc_attackchopper.cpp b/sp/src/game/server/hl2/npc_attackchopper.cpp index d8f0a0f5b7f..e17084ae7fe 100644 --- a/sp/src/game/server/hl2/npc_attackchopper.cpp +++ b/sp/src/game/server/hl2/npc_attackchopper.cpp @@ -3786,7 +3786,7 @@ void CNPC_AttackHelicopter::Event_Killed( const CTakeDamageInfo &info ) m_lifeState = LIFE_DYING; - if ( GetSleepState() == AISS_WAITING_FOR_INPUT ) + if ( GetSleepState() != AISS_WAITING_FOR_INPUT ) { CSoundEnvelopeController& controller = CSoundEnvelopeController::GetController(); controller.SoundChangeVolume( m_pGunFiringSound, 0.0, 0.1f );