From cc7700f01d98c1f2e56e9f3ad410743dbe2c8f91 Mon Sep 17 00:00:00 2001 From: Robert Göffringmann Date: Mon, 18 Aug 2003 20:36:55 +0000 Subject: fix sfx restart after restoring a savegame svn-id: r9770 --- sky/sound.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sky/sound.cpp b/sky/sound.cpp index 3739b69bf8..acad413f9a 100644 --- a/sky/sound.cpp +++ b/sky/sound.cpp @@ -1083,8 +1083,10 @@ void SkySound::loadSection(uint8 pSection) { _sampleRates = _soundData + sRateTabOfs; _sfxInfo = _soundData + _sfxBaseOfs; - for (uint8 cnt = 0; cnt < 4; cnt++) - _sfxQueue[cnt].count = 0; + // if we just restored a savegame, the sfxqueue holds the sound we need to restart + if (!(SkyState::_systemVars.systemFlags & SF_GAME_RESTORED)) + for (uint8 cnt = 0; cnt < 4; cnt++) + _sfxQueue[cnt].count = 0; } void SkySound::playSound(uint16 sound, uint16 volume, uint8 channel) { -- cgit v1.2.3