From 12e17c68a8afd74ad178225c3e30ee06d6bc1b47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philip=20Dub=C3=A9?= <159546+serprex@users.noreply.github.com> Date: Sun, 4 Oct 2026 15:39:07 +0000 Subject: [PATCH] don't set nextEntranceIndex in Play_Init, breaks FWWW (#7300) instead tracker uses gSaveContext.entranceIndex --- soh/soh/Enhancements/randomizer/randomizer_check_tracker.cpp | 5 ++--- soh/src/code/z_play.c | 3 --- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/soh/soh/Enhancements/randomizer/randomizer_check_tracker.cpp b/soh/soh/Enhancements/randomizer/randomizer_check_tracker.cpp index 5f9c36bcd5..901cbe27d1 100644 --- a/soh/soh/Enhancements/randomizer/randomizer_check_tracker.cpp +++ b/soh/soh/Enhancements/randomizer/randomizer_check_tracker.cpp @@ -285,7 +285,6 @@ static ImGuiTextFilter checkSearch; static bool recalculateAvailable = false; static RandomizerRegion availableChecksStartingRegion = RR_ROOT; static RandoAgeTime availableChecksStartingAgeTime = RAT_NONE; -static int16_t previousEntrance = 0; std::array filterAreasHidden = { 0 }; std::array filterChecksHidden = { 0 }; @@ -899,7 +898,7 @@ void CheckTrackerTransition(uint32_t sceneNum) { } if (!IsAreaSpoiled(currentArea) && (RandomizerCheckObjects::AreaIsOverworld(currentArea) || std::find(spoilingEntrances.begin(), spoilingEntrances.end(), - gPlayState->nextEntranceIndex) != spoilingEntrances.end())) { + gSaveContext.entranceIndex) != spoilingEntrances.end())) { SetAreaSpoiled(currentArea); } } @@ -2443,7 +2442,7 @@ void InternalRecalculateAvailableChecks(RandomizerRegion startingRegion, RandoAg const auto& ctx = Rando::Context::GetInstance(); logic = ctx->GetLogic(); - int16_t entranceIndex = gPlayState->nextEntranceIndex; + int16_t entranceIndex = gSaveContext.entranceIndex; if (startingRegion == RR_ROOT && entranceIndex >= 0 && entranceIndex < ENTR_MAX) { // Try to find a mapped entrance // e.g. ENTR_DEKU_TREE_0_1 (index 1) is not mapped, but ENTR_DEKU_TREE_ENTRANCE (index 0) is mapped diff --git a/soh/src/code/z_play.c b/soh/src/code/z_play.c index 37fc299da4..729edd0e27 100644 --- a/soh/src/code/z_play.c +++ b/soh/src/code/z_play.c @@ -649,9 +649,6 @@ void Play_Init(GameState* thisx) { DmaMgr_DmaRomToRam(0x03FEB000, gDebugCutsceneScript, sizeof(sDebugCutsceneScriptBuf)); } #endif - - // nextEntranceIndex was not initialized, so the previous value was carried over during soft resets. - gPlayState->nextEntranceIndex = gSaveContext.entranceIndex; } void Play_Update(PlayState* play) {