Skip to content

Commit

Permalink
ZVISION: Prepare save data while changing location
Browse files Browse the repository at this point in the history
  • Loading branch information
Marisa-Chan committed Aug 4, 2014
1 parent e9676f5 commit 1696e0d
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions engines/zvision/scripting/script_manager.cpp
Expand Up @@ -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);
Expand Down

0 comments on commit 1696e0d

Please sign in to comment.