diff options
Diffstat (limited to 'soh/soh/Enhancements/randomizer/hook_handlers.cpp')
| -rw-r--r-- | soh/soh/Enhancements/randomizer/hook_handlers.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/soh/soh/Enhancements/randomizer/hook_handlers.cpp b/soh/soh/Enhancements/randomizer/hook_handlers.cpp index ee2aecd55..d6ff0dc5b 100644 --- a/soh/soh/Enhancements/randomizer/hook_handlers.cpp +++ b/soh/soh/Enhancements/randomizer/hook_handlers.cpp @@ -2629,8 +2629,14 @@ void RandomizerOnPlayerUpdateHandler() { } if (!GameInteractor::IsGameplayPaused() && RAND_GET_OPTION(RSK_TRIFORCE_HUNT).IsNot(RO_TRIFORCE_HUNT_OFF)) { - // Warp to credits - if (GameInteractor::State::TriforceHuntCreditsWarpActive) { + // 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<u32>(GAMEPLAYSTAT_TOTAL_TIME); + gSaveContext.ship.stats.gameComplete = 1; + Play_PerformSave(gPlayState); + Notification::Emit({ .message = "Game autosaved" }); gPlayState->nextEntranceIndex = ENTR_CHAMBER_OF_THE_SAGES_0; gSaveContext.nextCutsceneIndex = 0xFFF2; gPlayState->transitionTrigger = TRANS_TRIGGER_START; |
