diff --git a/engines/draci/draci.cpp b/engines/draci/draci.cpp index 566d3056da4..fa0cf495a20 100644 --- a/engines/draci/draci.cpp +++ b/engines/draci/draci.cpp @@ -246,7 +246,13 @@ void DraciEngine::handleEvents() { if (escRoom >= 0) { // Schedule room change - // TODO: gate 0 is not always the best one for returning from the map + // TODO: gate 0 (always present) is not + // always best for returning from the + // map, e.g. in the starting location. + // also, after loading the game, we + // shouldn't run any gate program, but + // rather restore the state of all + // objects. _game->scheduleEnteringRoomUsingGate(escRoom, 0); // Immediately cancel any running animation or dubbing. @@ -394,8 +400,6 @@ Common::Error DraciEngine::loadGameState(int slot) { // here are now, without waiting for any other code to finish, thanks // to our constraint in canLoadGameStateCurrently() and to having // enterNewRoom() called right after we exit from here. - // - // TODO: Handle saving in the map room return loadSavegameData(slot, this); } diff --git a/engines/draci/game.cpp b/engines/draci/game.cpp index ea6e0aa9c62..5e124892dfd 100644 --- a/engines/draci/game.cpp +++ b/engines/draci/game.cpp @@ -1162,9 +1162,10 @@ void Game::deleteObjectAnimations() { bool Game::enterNewRoom() { if (_newRoom == getRoomNum() && !isReloaded()) { - // If the game has been reloaded, force reloading all animations. + _vm->_script->endCurrentProgram(false); return true; } + // If the game has been reloaded, force reloading all animations. setIsReloaded(false); debugC(1, kDraciLogicDebugLevel, "Entering room %d using gate %d", _newRoom, _newGate); _vm->_mouse->cursorOff(); diff --git a/engines/draci/saveload.cpp b/engines/draci/saveload.cpp index 57cfe5a8ad7..b0c5dd1f78d 100644 --- a/engines/draci/saveload.cpp +++ b/engines/draci/saveload.cpp @@ -151,7 +151,6 @@ Common::Error loadSavegameData(int saveGameIdx, DraciEngine *vm) { // Post-processing vm->_game->scheduleEnteringRoomUsingGate(vm->_game->getRoomNum(), 0); - vm->_game->setRoomNum(vm->_game->getPreviousRoomNum()); vm->_game->setExitLoop(true); vm->_game->setIsReloaded(true);