diff options
| author | Jordan Longstaff <JordanLongstaff@users.noreply.github.com> | 2025-11-13 17:31:57 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-11-13 15:31:57 -0700 |
| commit | 14fb9e60d8a1065ecb50d30308ff04850aa90ec6 (patch) | |
| tree | 5725969d16a939f99bce377299ce2fdba213832d | |
| parent | dadc2e521866ef79f04f296fb69c7821dab82ac8 (diff) | |
Autosave no longer works after save file is deleted (#5959)
| -rw-r--r-- | soh/soh/Enhancements/QoL/Autosave.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/soh/soh/Enhancements/QoL/Autosave.cpp b/soh/soh/Enhancements/QoL/Autosave.cpp index 01f85e0cd..49ab2996d 100644 --- a/soh/soh/Enhancements/QoL/Autosave.cpp +++ b/soh/soh/Enhancements/QoL/Autosave.cpp @@ -26,11 +26,13 @@ typedef enum { static bool Autosave_CanSave() { // Don't save when in title screen or debug file + // Don't save a file that doesn't exist (e.g. it was deleted on death by user option) // Don't save the first 60 frames to not save the magic meter when it's still in the animation of filling it. // Don't save in Chamber of Sages and the Cutscene map because of remember save location and cutscene item gives. // Don't save between obtaining Ocarina of Time and Song of Time because the latter would become unobtainable. - if (!GameInteractor::IsSaveLoaded(false) || gPlayState->gameplayFrames < 60 || - gPlayState->sceneNum == SCENE_CHAMBER_OF_THE_SAGES || gPlayState->sceneNum == SCENE_CUTSCENE_MAP || + if (!SaveManager::Instance->SaveFile_Exist(gSaveContext.fileNum) || !GameInteractor::IsSaveLoaded(false) || + gPlayState->gameplayFrames < 60 || gPlayState->sceneNum == SCENE_CHAMBER_OF_THE_SAGES || + gPlayState->sceneNum == SCENE_CUTSCENE_MAP || (!CHECK_QUEST_ITEM(QUEST_SONG_TIME) && (INV_CONTENT(ITEM_OCARINA_TIME) == ITEM_OCARINA_TIME))) { return false; } |
