Another round of fixes for skip intro and grotto rando (#4253)

This commit is contained in:
Archez 2024-07-25 21:09:45 -04:00 committed by GitHub
parent e66dada09d
commit b81a3dd099
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 5 deletions

View File

@ -18,7 +18,8 @@ void SkipIntro_Register() {
bool shuffleOverworldSpawns =
OTRGlobals::Instance->gRandoContext->GetOption(RSK_SHUFFLE_OVERWORLD_SPAWNS).Is(true);
if ((CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.Intro"), IS_RANDO) ||
(IS_RANDO && (adultStart || shuffleOverworldSpawns)) && gSaveContext.cutsceneIndex == 0xFFF1)) {
(IS_RANDO && (adultStart || shuffleOverworldSpawns))) &&
gSaveContext.cutsceneIndex == 0xFFF1) {
// Calculate spawn location. Start with vanilla, Link's house.
int32_t spawnEntrance = ENTR_LINKS_HOUSE_0;
// If we're not in rando, we can skip all of the below.

View File

@ -142,12 +142,12 @@ s16 Grotto_GetEntranceValueHandlingGrottoRando(s16 nextEntranceIndex) {
nextEntranceIndex = grottoExitList[grottoId];
}
// Get the new grotto id from the next entrance
grottoId = nextEntranceIndex & 0x00FF;
// Get the new grotto id from the next entrance, temp value to override modifying the static one
s8 tempGrottoId = nextEntranceIndex & 0x00FF;
// Grotto Returns
if (nextEntranceIndex >= ENTRANCE_RANDO_GROTTO_EXIT_START && nextEntranceIndex < ENTRANCE_RANDO_GROTTO_EXIT_START + NUM_GROTTOS) {
GrottoReturnInfo grotto = grottoReturnTable[grottoId];
GrottoReturnInfo grotto = grottoReturnTable[tempGrottoId];
// When the nextEntranceIndex is determined by a dynamic exit,
// or set by Entrance_OverrideBlueWarp to mark a blue warp entrance,
@ -162,7 +162,7 @@ s16 Grotto_GetEntranceValueHandlingGrottoRando(s16 nextEntranceIndex) {
}
// Grotto Loads
} else if (nextEntranceIndex >= ENTRANCE_RANDO_GROTTO_LOAD_START && nextEntranceIndex < ENTRANCE_RANDO_GROTTO_EXIT_START) {
GrottoLoadInfo grotto = grottoLoadTable[grottoId];
GrottoLoadInfo grotto = grottoLoadTable[tempGrottoId];
nextEntranceIndex = grotto.entranceIndex;
}