Fix: Rando settings not being initialized in time #2461
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
It was reported that the entrance tracker would not populate if you had no spoiler log loaded, or the spoiler log is for a different seed without entrance randomizer enabled. Similarly it was reported that save warping in a randomized boss room would place you in the un-randomized dungeon.
These two issues both stem from the same problem: the entrance init and tracker init were happening before a proper call to
Randomizer_LoadSettings("")
. In this case the entrance methods were inSram_OpenSave()
which happens beforeRandomizer_LoadSettings("")
. This PR just moves the entrance methods to be later inFileChoose_LoadGame()
to have the proper rando settings loaded.While fixing this, I noticed there is also one other RSK_ check happening in
Sram_OpenSave()
to prevent spoiling adult trade items when adult trade is enabled. Not having the right spoiler log loaded means that you could have the incorrect adult trade item in your inventory (e.g. mushroom gets replaced with Cojiro). Digging into it I found that originally in theLoadRandomizerVersion1()
method, we were callingrandomizer->LoadRandomizerSettings("")
, but in the newerloadRandomizerVersion2()
this line was missing and is a regression. I've added this line to the V2 load call to prevent the spoiling.Build Artifacts