diff options
author | Nikolay Korolev <nickvnuk@gmail.com> | 2021-08-01 11:54:05 +0200 |
---|---|---|
committer | Nikolay Korolev <nickvnuk@gmail.com> | 2021-08-01 11:54:05 +0200 |
commit | 70080f1fdbafe5ecd11c573d4d9fba522a5d8235 (patch) | |
tree | f2a737732d7d7a05b7195b69bf3f317233acbca3 /src/save/GenericGameStorage.cpp | |
parent | CVisibilityPlugins and CRenderer fixes; pulled MLO back in (diff) | |
download | re3-70080f1fdbafe5ecd11c573d4d9fba522a5d8235.tar re3-70080f1fdbafe5ecd11c573d4d9fba522a5d8235.tar.gz re3-70080f1fdbafe5ecd11c573d4d9fba522a5d8235.tar.bz2 re3-70080f1fdbafe5ecd11c573d4d9fba522a5d8235.tar.lz re3-70080f1fdbafe5ecd11c573d4d9fba522a5d8235.tar.xz re3-70080f1fdbafe5ecd11c573d4d9fba522a5d8235.tar.zst re3-70080f1fdbafe5ecd11c573d4d9fba522a5d8235.zip |
Diffstat (limited to '')
-rw-r--r-- | src/save/GenericGameStorage.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/save/GenericGameStorage.cpp b/src/save/GenericGameStorage.cpp index dec84c9e..c42ae738 100644 --- a/src/save/GenericGameStorage.cpp +++ b/src/save/GenericGameStorage.cpp @@ -1176,13 +1176,20 @@ void DisplaySaveResult(int unk, char* name) bool SaveGameForPause(int type) { - if (AllowMissionReplay != 0 || type != 3 && WaitForSave > CTimer::GetTimeInMilliseconds()) + if (AllowMissionReplay != 0 && AllowMissionReplay != 7) { + debug("SaveGameForPause failed during AllowMissionReplay %d", AllowMissionReplay); return false; + } + if (type != 3 && WaitForSave > CTimer::GetTimeInMilliseconds()) { + debug("SaveGameForPause failed WaitForSave"); + return false; + } WaitForSave = 0; - if (gGameState != GS_PLAYING_GAME || CTheScripts::IsPlayerOnAMission() || CStats::LastMissionPassedName[0] == '\0') { + if (gGameState != GS_PLAYING_GAME || (CTheScripts::bAlreadyRunningAMissionScript && type != 5)) { DisplaySaveResult(3, CStats::LastMissionPassedName); return false; } + debug("SaveGameForPause ******************************** %s doSave %d", CStats::LastMissionPassedName, !CTheScripts::bAlreadyRunningAMissionScript); IsQuickSave = type; MissionStartTime = 0; int res = PcSaveHelper.SaveSlot(PAUSE_SAVE_SLOT); |