summaryrefslogtreecommitdiffstats
path: root/src/save
diff options
context:
space:
mode:
authorNikolay Korolev <nickvnuk@gmail.com>2021-08-01 11:54:05 +0200
committerNikolay Korolev <nickvnuk@gmail.com>2021-08-07 19:24:01 +0200
commitc69edce8007178755d979f638852abb9359950c2 (patch)
treef041976b6ac5421582deae12e056b0d2e6e04ac2 /src/save
parentlcs specific hack (diff)
downloadre3-c69edce8007178755d979f638852abb9359950c2.tar
re3-c69edce8007178755d979f638852abb9359950c2.tar.gz
re3-c69edce8007178755d979f638852abb9359950c2.tar.bz2
re3-c69edce8007178755d979f638852abb9359950c2.tar.lz
re3-c69edce8007178755d979f638852abb9359950c2.tar.xz
re3-c69edce8007178755d979f638852abb9359950c2.tar.zst
re3-c69edce8007178755d979f638852abb9359950c2.zip
Diffstat (limited to 'src/save')
-rw-r--r--src/save/GenericGameStorage.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/save/GenericGameStorage.cpp b/src/save/GenericGameStorage.cpp
index d2fbb9b0..90a5711e 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);