mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-15 00:27:31 +00:00
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
This commit is contained in:
parent
3fe7c645ed
commit
9f00880aa4
@ -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 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user