diff options
author | Filippos Karapetis | 2015-01-16 14:08:15 +0200 |
---|---|---|
committer | Filippos Karapetis | 2015-01-16 14:08:15 +0200 |
commit | 9f00880aa40abb7584a007e10591ee5aa593ae7a (patch) | |
tree | 61223646edbfa07a7342e64a51c22ff7be1a1982 | |
parent | 3fe7c645ed11d57cc5f7e1da588fb43cfe1affa3 (diff) | |
download | scummvm-rg350-9f00880aa40abb7584a007e10591ee5aa593ae7a.tar.gz scummvm-rg350-9f00880aa40abb7584a007e10591ee5aa593ae7a.tar.bz2 scummvm-rg350-9f00880aa40abb7584a007e10591ee5aa593ae7a.zip |
ZVISION: Properly handle sounds reusing the same sound slot (bug #6761)
This is based on Marisa-Chan's observations in commit 28e27ea1d9.
Tested with both ZNEM and ZGI
-rw-r--r-- | engines/zvision/scripting/actions.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/engines/zvision/scripting/actions.cpp b/engines/zvision/scripting/actions.cpp index 3aab6d8830..ce6bd31ee4 100644 --- a/engines/zvision/scripting/actions.cpp +++ b/engines/zvision/scripting/actions.cpp @@ -486,6 +486,11 @@ ActionMusic::~ActionMusic() { } bool ActionMusic::execute() { + if (_engine->getScriptManager()->getSideFX(_slotKey)) { + _engine->getScriptManager()->killSideFx(_slotKey); + _engine->getScriptManager()->setStateValue(_slotKey, 2); + } + if (_midi) { _engine->getScriptManager()->addSideFX(new MusicMidiNode(_engine, _slotKey, _prog, _note, _volume)); } else { |