ULTIMA4: Allow for loading saves in cities

This commit is contained in:
Paul Gilbert 2020-05-09 10:16:50 -07:00
parent 05bc8c295f
commit 8b1535cbdd
2 changed files with 5 additions and 3 deletions

View File

@ -202,6 +202,10 @@ void Ultima4Engine::setToJourneyOnwards() {
assert(_saveSlotToLoad);
}
bool Ultima4Engine::canLoadGameStateCurrently(bool isAutosave) {
return g_game != nullptr && g_context != nullptr && eventHandler->getController() == g_game;
}
bool Ultima4Engine::canSaveGameStateCurrently(bool isAutosave) {
return g_game != nullptr && g_context != nullptr && eventHandler->getController() == g_game
&& (g_context->_location->_context & CTX_CAN_SAVE_GAME);

View File

@ -98,9 +98,7 @@ public:
/**
* Returns true if a savegame can be loaded
*/
bool canLoadGameStateCurrently(bool isAutosave = false) override {
return canSaveGameStateCurrently(isAutosave);
}
bool canLoadGameStateCurrently(bool isAutosave = false) override;
/**
* Returns true if the game can be saved