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.
This commit is contained in:
Amun
2025-09-01 18:36:22 +03:00
parent f6c9422048
commit 1432d4c8ea

View File

@@ -1292,9 +1292,8 @@ void CArea::TAmbienceInstance::UpdateOnceSound(float fxCenter, float fyCenter, f
playSoundInstance = SoundEngine::Instance().PlayAmbienceSound3D(fx, fy, fz, c_szFileName); playSoundInstance = SoundEngine::Instance().PlayAmbienceSound3D(fx, fy, fz, c_szFileName);
} }
} }
else if (playSoundInstance) else
{ {
playSoundInstance->Stop();
playSoundInstance = nullptr; playSoundInstance = nullptr;
} }
} }
@@ -1342,9 +1341,8 @@ void CArea::TAmbienceInstance::UpdateLoopSound(float fxCenter, float fyCenter, f
if (playSoundInstance) if (playSoundInstance)
playSoundInstance->SetVolume(__GetVolumeFromDistance(fDistance)); playSoundInstance->SetVolume(__GetVolumeFromDistance(fDistance));
} }
else if (playSoundInstance) else
{ {
playSoundInstance->Stop();
playSoundInstance = nullptr; playSoundInstance = nullptr;
} }
} }