diff --git a/soh/soh/Enhancements/gameplaystats.cpp b/soh/soh/Enhancements/gameplaystats.cpp index 71ae03c92d..66d90c74a4 100644 --- a/soh/soh/Enhancements/gameplaystats.cpp +++ b/soh/soh/Enhancements/gameplaystats.cpp @@ -293,6 +293,7 @@ void LoadStatsVersion1() { SaveManager::Instance->LoadData("fileCreatedAt", gSaveContext.ship.stats.fileCreatedAt); SaveManager::Instance->LoadData("playTimer", gSaveContext.ship.stats.playTimer); SaveManager::Instance->LoadData("pauseTimer", gSaveContext.ship.stats.pauseTimer); + SaveManager::Instance->LoadData("gameComplete", gSaveContext.ship.stats.gameComplete); SaveManager::Instance->LoadArray( "itemTimestamps", ARRAY_COUNT(gSaveContext.ship.stats.itemTimestamp), [](size_t i) { SaveManager::Instance->LoadData("", gSaveContext.ship.stats.itemTimestamp[i]); }); @@ -343,6 +344,7 @@ void SaveStats(const SaveContext& saveContext, int sectionID, bool fullSave) { SaveManager::Instance->SaveData("fileCreatedAt", saveContext.ship.stats.fileCreatedAt); SaveManager::Instance->SaveData("playTimer", saveContext.ship.stats.playTimer); SaveManager::Instance->SaveData("pauseTimer", saveContext.ship.stats.pauseTimer); + SaveManager::Instance->SaveData("gameComplete", saveContext.ship.stats.gameComplete); SaveManager::Instance->SaveArray( "itemTimestamps", ARRAY_COUNT(saveContext.ship.stats.itemTimestamp), [&](size_t i) { SaveManager::Instance->SaveData("", saveContext.ship.stats.itemTimestamp[i]); }); diff --git a/soh/soh/Enhancements/randomizer/hook_handlers.cpp b/soh/soh/Enhancements/randomizer/hook_handlers.cpp index a49b4dfe9c..6d329f823d 100644 --- a/soh/soh/Enhancements/randomizer/hook_handlers.cpp +++ b/soh/soh/Enhancements/randomizer/hook_handlers.cpp @@ -2743,9 +2743,6 @@ void RandomizerOnPlayerUpdateHandler() { // Warp to credits once item queue has drained to avoid losing queued items if (GameInteractor::State::TriforceHuntCreditsWarpActive && randomizerQueuedChecks.empty() && randomizerQueuedCheck == RC_UNKNOWN_CHECK) { - gSaveContext.ship.stats.itemTimestamp[TIMESTAMP_TRIFORCE_COMPLETED] = - static_cast(GAMEPLAYSTAT_TOTAL_TIME); - gSaveContext.ship.stats.gameComplete = 1; Play_PerformSave(gPlayState); Notification::Emit({ .message = "Game autosaved" }); gPlayState->nextEntranceIndex = ENTR_CHAMBER_OF_THE_SAGES_0; diff --git a/soh/soh/Enhancements/randomizer/randomizer.cpp b/soh/soh/Enhancements/randomizer/randomizer.cpp index 9920897368..6d10ccf77e 100644 --- a/soh/soh/Enhancements/randomizer/randomizer.cpp +++ b/soh/soh/Enhancements/randomizer/randomizer.cpp @@ -1398,6 +1398,9 @@ extern "C" u16 Randomizer_Item_Give(PlayState* play, GetItemEntry giEntry) { } break; case RG_TRIFORCE: + gSaveContext.ship.stats.itemTimestamp[TIMESTAMP_TRIFORCE_COMPLETED] = + static_cast(GAMEPLAYSTAT_TOTAL_TIME); + gSaveContext.ship.stats.gameComplete = 1; GameInteractor_SetTriforceHuntCreditsWarpActive(true); break; case RG_TRIFORCE_PIECE: