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
1 changed files with 5 additions and 0 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue