diff options
Diffstat (limited to 'engines/zvision/scripting/script_manager.cpp')
-rw-r--r-- | engines/zvision/scripting/script_manager.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/engines/zvision/scripting/script_manager.cpp b/engines/zvision/scripting/script_manager.cpp index 380141490a..7a2854d230 100644 --- a/engines/zvision/scripting/script_manager.cpp +++ b/engines/zvision/scripting/script_manager.cpp @@ -538,8 +538,18 @@ void ScriptManager::do_changeLocation() { } } - // Auto save - //_engine->getSaveManager()->autoSave(); + if (_nextLocation.world == 'g' && _nextLocation.room == 'j') { + if (_nextLocation.node == 's' && _nextLocation.view == 'e' && + _currentLocation.world != 'g' && _currentLocation.room != 'j') + _engine->getSaveManager()->prepareSaveBuffer(); + } else { + if (_currentLocation.world == 'g' && _currentLocation.room == 'j') + _engine->getSaveManager()->flushSaveBuffer(); + else { + // Auto save + //_engine->getSaveManager()->autoSave(); + } + } setStateValue(StateKey_World, _nextLocation.world); setStateValue(StateKey_Room, _nextLocation.room); |