From 75d1385c8d1ba61b5740a0b43966d3c2f111440d Mon Sep 17 00:00:00 2001 From: Strangerke Date: Mon, 25 Jan 2016 01:11:51 +0100 Subject: LAB: Wait for the end of sound effects when they are played in Diff files. Fixes toilet noises. --- engines/lab/processroom.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'engines/lab') diff --git a/engines/lab/processroom.cpp b/engines/lab/processroom.cpp index f0d17bbc24..ecbfb4e2a7 100644 --- a/engines/lab/processroom.cpp +++ b/engines/lab/processroom.cpp @@ -252,9 +252,16 @@ void LabEngine::doActions(const ActionList &actionList) { _music->loadSoundEffect(action->_messages[0], true, false); break; - case kActionShowDiff: + case kActionShowDiff: { + bool curWait = _anim->_waitForEffect; + // Pause the engine until the sound is finished + _anim->_waitForEffect = true; _graphics->readPict(action->_messages[0], true); + + // Restore the previous value of _waitForEffect + _anim->_waitForEffect = curWait; break; + } case kActionShowDiffLooping: // used in scene 44 (heart of the labyrinth, minotaur) _graphics->readPict(action->_messages[0], false); -- cgit v1.2.3