From d811df89ff4c786ec36b44f598e6f373519e5e2b Mon Sep 17 00:00:00 2001 From: Strangerke Date: Tue, 13 Aug 2013 00:06:09 +0200 Subject: MORTEVIELLE: Fix door animation display when opening the doors --- engines/mortevielle/actions.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'engines/mortevielle/actions.cpp') diff --git a/engines/mortevielle/actions.cpp b/engines/mortevielle/actions.cpp index 3e3db5b224..f7cc239997 100644 --- a/engines/mortevielle/actions.cpp +++ b/engines/mortevielle/actions.cpp @@ -1147,6 +1147,10 @@ void MortevielleEngine::fctEnter() { int randVal = (getRandomNumber(0, 10)) - 5; _soundManager.startSpeech(7, randVal, 1); displayAnimFrame(1, 1); + while (_mixer->isSoundHandleActive(_soundManager._soundHandle) && !keyPressed() && !_mouseClick && !shouldQuit()) + ; + // In case the handle is still active, stop it. + _mixer->stopHandle(_soundManager._soundHandle); int charIndex = convertBitIndexToCharacterIndex(z); ++_coreVar._faithScore; @@ -1168,6 +1172,10 @@ void MortevielleEngine::fctEnter() { int randVal = (getRandomNumber(0, 10)) - 5; _soundManager.startSpeech(7, randVal, 1); displayAnimFrame(1, 1); + while (_mixer->isSoundHandleActive(_soundManager._soundHandle) && !keyPressed() && !_mouseClick && !shouldQuit()) + ; + // In case the handle is still active, stop it. + _mixer->stopHandle(_soundManager._soundHandle); _coreVar._currPlace = _roomDoorId; prepareDisplayText(); -- cgit v1.2.3