Skip to content

Commit

Permalink
MOHAWK: RIVEN: Execute the stored opcode before resetting movies
Browse files Browse the repository at this point in the history
Otherwise the movie position is zero which leads the comparison with the
stored opcode position to always be false.
Fixes #10426, a regression from cf1171d.
  • Loading branch information
bgK committed Feb 5, 2018
1 parent 9dbffa1 commit 5322606
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions engines/mohawk/riven_video.cpp
Expand Up @@ -252,19 +252,19 @@ void RivenVideo::playBlocking(int32 endTime) {
}
}

if (playTillEnd) {
disable();
stop();
seek(0);
}

// Execute the stored opcode
uint16 storedOpcodeMovieSlot = _vm->_scriptMan->getStoredMovieOpcodeSlot();
uint32 storedOpcodeTime = _vm->_scriptMan->getStoredMovieOpcodeTime();
if (_slot == storedOpcodeMovieSlot && getTime() >= storedOpcodeTime) { // CHECKME: Suspicious use of time units
_vm->_scriptMan->runStoredMovieOpcode();
}

if (playTillEnd) {
disable();
stop();
seek(0);
}

_vm->_cursor->showCursor();
}

Expand Down

0 comments on commit 5322606

Please sign in to comment.