diff --git a/soh/soh/Enhancements/randomizer/ShuffleRedIce.cpp b/soh/soh/Enhancements/randomizer/ShuffleRedIce.cpp index 3e742a0925..1a31811c32 100644 --- a/soh/soh/Enhancements/randomizer/ShuffleRedIce.cpp +++ b/soh/soh/Enhancements/randomizer/ShuffleRedIce.cpp @@ -118,6 +118,12 @@ void BgIceShelter_RandomizerSpawnCollectible(Actor* actor) { } } +void BgIceShelter_KingZoraSpawnCollectible(void* actor) { + if (!Flags_GetRandomizerInf(RAND_INF_ZD_KING_ZORA_RED_ICE) && Flags_GetInfTable(INFTABLE_138)) { + Flags_SetRandomizerInf(RAND_INF_ZD_KING_ZORA_RED_ICE); + } +} + static CheckIdentity IdentifyRedIce(s32 sceneNum, s32 posX, s32 posZ) { struct CheckIdentity redIceIdentity; uint32_t redIceSceneNum = sceneNum; @@ -176,6 +182,9 @@ void RegisterShuffleRedIce() { } } }); + + // Give King Zora red ice item if ice was removed with glitch + COND_ID_HOOK(OnActorInit, ACTOR_EN_KZ, shouldRegister, BgIceShelter_KingZoraSpawnCollectible); } void Rando::StaticData::RegisterRedIceLocations() {