From 8b916a75656fb36f11335e5b8fc6a540391f7b45 Mon Sep 17 00:00:00 2001 From: hiker Date: Wed, 11 Nov 2015 23:14:00 +1100 Subject: [PATCH] Fixed sfx not playing at right location (e.g. bridge in Green Valley). --- src/audio/sfx_openal.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/audio/sfx_openal.cpp b/src/audio/sfx_openal.cpp index da411fdad..d922dddfd 100644 --- a/src/audio/sfx_openal.cpp +++ b/src/audio/sfx_openal.cpp @@ -378,6 +378,13 @@ void SFXOpenAL::reallyPlayNow() alSourcePlay(m_sound_source); SFXManager::checkError("playing"); + // Esp. with terrain sounds it can (very likely) happen that the status + // got overwritten: a sound is created and an init event is queued. Then + // a play event is queued, and the status is immediately changed to + // playing. But when now the init event is executed, the status is set + // to stopped again. So for this case we have to set the status to + // playing again. + m_status = SFX_PLAYING; } // reallyPlayNow //-----------------------------------------------------------------------------