From 0ebf04520a7e5d2eff59fda6d90cd8b39b43b301 Mon Sep 17 00:00:00 2001 From: Bastien Bouclet Date: Sun, 22 Apr 2018 08:12:31 +0200 Subject: [PATCH] MOHAWK: MYST: Fix the sound effect not playing in opcode 41 Changing the background sound when switching cards could stop the effect sound immediately after it started. Fixes Trac#10493. --- engines/mohawk/myst_scripts.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/engines/mohawk/myst_scripts.cpp b/engines/mohawk/myst_scripts.cpp index 4b22a94d0c0..1ff08ea77dd 100644 --- a/engines/mohawk/myst_scripts.cpp +++ b/engines/mohawk/myst_scripts.cpp @@ -754,11 +754,11 @@ void MystScriptParser::o_changeCardPlaySoundDirectional(uint16 var, const Argume debugC(kDebugScript, "\tdelay between steps: %d", delayBetweenSteps); debugC(kDebugScript, "\tanimated update data size: %d", dataSize); + _vm->changeToCard(cardId, kNoTransition); + if (soundId) _vm->_sound->playEffect(soundId); - _vm->changeToCard(cardId, kNoTransition); - animatedUpdate(ArgumentsArray(args.begin() + 4, dataSize), delayBetweenSteps); }