Skip to content

Conversation

@xxAtrain223
Copy link
Contributor

@xxAtrain223 xxAtrain223 commented Jan 19, 2026

Currently, Available checks is only calculated from RR_ROOT, then spawns, etc. Being teleported to an unexpected location may make several checks accessible even though it's via a sequence break. This PR is to recalculate Available Checks from the current Randomizer Region in addition to RR_ROOT. It does this by using the LastEntranceIndex from the Entrance Tracker and looking up where that entrance led to.

There are few gaps at the moment because they don't use Entrance_OverrideNextIndex to lookup the randomized entrance.

  • Debug Console
  • Debug Warping
  • Teleport Traps

Build Artifacts

@serprex serprex requested a review from garrettjoecox January 19, 2026 02:51
@xxAtrain223
Copy link
Contributor Author

Teleport Traps use this function: GameInteractor::RawAction::TeleportPlayer

@xxAtrain223
Copy link
Contributor Author

Debug Warping in z_select.c Select_LoadGame and Select_Grotto_LoadGame set gSaveContext.entranceIndex and initialize the PlayState. I'm unsure of a good way to detect when to use gSaveContext.entranceIndex vs gPlayState->nextEntranceIndex, so I think it'll just be a limitation unless somebody with deeper knowledge has a better solution.

@xxAtrain223 xxAtrain223 marked this pull request as ready for review January 21, 2026 02:52
@serprex
Copy link
Contributor

serprex commented Jan 21, 2026

as long as debug warp behavior is temporary I'm good with it (doesn't crash, doesn't mark things available incorrectly, corrects itself once an entrance is used)

@xxAtrain223
Copy link
Contributor Author

Cool, then I think it'll be good to go pending ProxySaw's play test.

Copy link
Contributor

@garrettjoecox garrettjoecox left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for this!

@xxAtrain223
Copy link
Contributor Author

nextEntranceIndex was not being initialized, so the initial value is random and soft resets carry over the previous value.
Initializing it to gSaveContext.entranceIndex has the added benefit of making Debug Warping work.

@serprex serprex merged commit f5264be into HarbourMasters:develop Jan 26, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants