diff options
author | Marisa-Chan | 2014-08-04 16:43:15 +0700 |
---|---|---|
committer | Marisa-Chan | 2014-08-04 16:43:15 +0700 |
commit | 1696e0dd9675f087608fdfabb7b5c93d7d2820df (patch) | |
tree | de4cdd06f59352eb4197e8992975567d99d74fec | |
parent | e9676f5d7aa0a77b649ee99f4222f571894f96c2 (diff) | |
download | scummvm-rg350-1696e0dd9675f087608fdfabb7b5c93d7d2820df.tar.gz scummvm-rg350-1696e0dd9675f087608fdfabb7b5c93d7d2820df.tar.bz2 scummvm-rg350-1696e0dd9675f087608fdfabb7b5c93d7d2820df.zip |
ZVISION: Prepare save data while changing location
-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); |