mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-08-20 13:23:45 -07:00
Shuffle Fairies - Fix fairies spawning without playing song (#4884)
* Fix fairies spawning without playing song * Better if statement
This commit is contained in:
parent
0497ad20d8
commit
5ae527c194
1 changed files with 31 additions and 35 deletions
|
@ -129,20 +129,15 @@ void ShuffleFairies_OnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should,
|
|||
} else if (id == VB_SPAWN_GOSSIP_STONE_FAIRY) {
|
||||
EnGs* gossipStone = (EnGs*)(actor);
|
||||
|
||||
// If not any of the songs that normally spawn a fairy, mimic vanilla behaviour.
|
||||
if (gPlayState->msgCtx.ocarinaMode == OCARINA_MODE_01) {
|
||||
Player* player = GET_PLAYER(gPlayState);
|
||||
player->stateFlags2 |= PLAYER_STATE2_NEAR_OCARINA_ACTOR;
|
||||
return;
|
||||
} else if (gPlayState->msgCtx.unk_E3F2 != OCARINA_SONG_LULLABY &&
|
||||
gPlayState->msgCtx.unk_E3F2 != OCARINA_SONG_SARIAS &&
|
||||
gPlayState->msgCtx.unk_E3F2 != OCARINA_SONG_EPONAS &&
|
||||
gPlayState->msgCtx.unk_E3F2 != OCARINA_SONG_SUNS &&
|
||||
gPlayState->msgCtx.unk_E3F2 != OCARINA_SONG_TIME &&
|
||||
gPlayState->msgCtx.unk_E3F2 != OCARINA_SONG_STORMS &&
|
||||
gPlayState->msgCtx.ocarinaMode != OCARINA_MODE_04) {
|
||||
return;
|
||||
}
|
||||
// Mimic vanilla behaviour, only go into this path if song played is one of the ones normally spawning a fairy.
|
||||
// Otherwise fall back to vanilla behaviour.
|
||||
if (gPlayState->msgCtx.ocarinaMode == OCARINA_MODE_04 &&
|
||||
(gPlayState->msgCtx.unk_E3F2 == OCARINA_SONG_LULLABY ||
|
||||
gPlayState->msgCtx.unk_E3F2 == OCARINA_SONG_SARIAS ||
|
||||
gPlayState->msgCtx.unk_E3F2 == OCARINA_SONG_EPONAS ||
|
||||
gPlayState->msgCtx.unk_E3F2 == OCARINA_SONG_SUNS ||
|
||||
gPlayState->msgCtx.unk_E3F2 == OCARINA_SONG_TIME ||
|
||||
gPlayState->msgCtx.unk_E3F2 == OCARINA_SONG_STORMS)) {
|
||||
|
||||
int32_t params = (gPlayState->sceneNum == SCENE_GROTTOS) ? Grotto_CurrentGrotto() : 0;
|
||||
// Distinguish storms fairies from the normal song fairies
|
||||
|
@ -172,6 +167,7 @@ void ShuffleFairies_OnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should,
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
uint32_t onVanillaBehaviorHook = 0;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue