From 1432d4c8eaca5ed42bdca51a7ea280c4db60309e Mon Sep 17 00:00:00 2001 From: Amun Date: Mon, 1 Sep 2025 18:36:22 +0300 Subject: [PATCH] Removed playSoundInstance->Stop A new instance is acquired whenever a new sound is played in the area. The previous instance might be acquired by another part of the game, stopping it was a mistake on my side. --- src/GameLib/Area.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/GameLib/Area.cpp b/src/GameLib/Area.cpp index 399f8eb..ad3a77f 100644 --- a/src/GameLib/Area.cpp +++ b/src/GameLib/Area.cpp @@ -1292,9 +1292,8 @@ void CArea::TAmbienceInstance::UpdateOnceSound(float fxCenter, float fyCenter, f playSoundInstance = SoundEngine::Instance().PlayAmbienceSound3D(fx, fy, fz, c_szFileName); } } - else if (playSoundInstance) + else { - playSoundInstance->Stop(); playSoundInstance = nullptr; } } @@ -1342,9 +1341,8 @@ void CArea::TAmbienceInstance::UpdateLoopSound(float fxCenter, float fyCenter, f if (playSoundInstance) playSoundInstance->SetVolume(__GetVolumeFromDistance(fDistance)); } - else if (playSoundInstance) + else { - playSoundInstance->Stop(); playSoundInstance = nullptr; } }