Fix running clearing IsReloaded().

Currently, if gate programs used loop(), they exitted immediately due to not
having cleared this flag.

svn-id: r45753
This commit is contained in:
Robert Špalek 2009-11-08 18:55:41 +00:00
parent f8ab3f866e
commit 121baa2660

View File

@ -444,6 +444,7 @@ void Game::advanceAnimationsAndTestLoopExit() {
bool walkingFinished = false;
if (_walkingState.isActive()) {
walkingFinished = !_walkingState.continueWalkingOrClearPath();
// If walking has finished, the path won't be active anymore.
}
// Advance animations (this may also call setExitLoop(true) in the
@ -1355,6 +1356,7 @@ bool Game::enterNewRoom() {
// If the game has been reloaded, force reloading all animations.
return true;
}
setIsReloaded(false);
debugC(1, kDraciLogicDebugLevel, "Entering room %d using gate %d", _newRoom, _newGate);
_vm->_mouse->cursorOff();
@ -1444,7 +1446,6 @@ bool Game::enterNewRoom() {
// Reset the loop status.
setLoopStatus(kStatusOrdinary);
setIsReloaded(false);
if (_vm->_script->shouldEndProgram()) {
// Escape pressed during the intro or map animations run in the
// init scripts. This flag was turned on to skip the rest of