mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2024-11-25 19:02:19 -05:00
Randomizer: Ocarina of Time Ice Trap Fix (#964)
* Fixes Ice Trap on OoT check from preventing SoT check * Removes unneeded GlobalContext argument.
This commit is contained in:
parent
b89cc25df3
commit
fe02818d51
@ -1502,6 +1502,11 @@ extern "C" s32 Randomizer_GetItemIdFromKnownCheck(RandomizerCheck randomizerChec
|
|||||||
return OTRGlobals::Instance->gRandomizer->GetRandomizedItemIdFromKnownCheck(randomizerCheck, ogId);
|
return OTRGlobals::Instance->gRandomizer->GetRandomizedItemIdFromKnownCheck(randomizerCheck, ogId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
extern "C" bool Randomizer_ObtainedFreestandingIceTrap(RandomizerCheck randomizerCheck, GetItemID ogId, Actor* actor) {
|
||||||
|
return gSaveContext.n64ddFlag && (actor->parent != NULL) &&
|
||||||
|
Randomizer_GetItemIdFromKnownCheck(randomizerCheck, ogId) == GI_ICE_TRAP;
|
||||||
|
}
|
||||||
|
|
||||||
extern "C" bool Randomizer_ItemIsIceTrap(RandomizerCheck randomizerCheck, GetItemID ogId) {
|
extern "C" bool Randomizer_ItemIsIceTrap(RandomizerCheck randomizerCheck, GetItemID ogId) {
|
||||||
return gSaveContext.n64ddFlag && Randomizer_GetItemIdFromKnownCheck(randomizerCheck, ogId) == GI_ICE_TRAP;
|
return gSaveContext.n64ddFlag && Randomizer_GetItemIdFromKnownCheck(randomizerCheck, ogId) == GI_ICE_TRAP;
|
||||||
}
|
}
|
||||||
|
@ -97,6 +97,7 @@ s16 Randomizer_GetItemModelFromId(s16 itemId);
|
|||||||
s32 Randomizer_GetItemIDFromGetItemID(s32 getItemId);
|
s32 Randomizer_GetItemIDFromGetItemID(s32 getItemId);
|
||||||
s32 Randomizer_GetRandomizedItemId(GetItemID ogId, s16 actorId, s16 actorParams, s16 sceneNum);
|
s32 Randomizer_GetRandomizedItemId(GetItemID ogId, s16 actorId, s16 actorParams, s16 sceneNum);
|
||||||
s32 Randomizer_GetItemIdFromKnownCheck(RandomizerCheck randomizerCheck, GetItemID ogId);
|
s32 Randomizer_GetItemIdFromKnownCheck(RandomizerCheck randomizerCheck, GetItemID ogId);
|
||||||
|
bool Randomizer_ObtainedFreestandingIceTrap(RandomizerCheck randomizerCheck, GetItemID ogId, Actor* actor);
|
||||||
bool Randomizer_ItemIsIceTrap(RandomizerCheck randomizerCheck, GetItemID ogId);
|
bool Randomizer_ItemIsIceTrap(RandomizerCheck randomizerCheck, GetItemID ogId);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -168,7 +168,8 @@ void ItemOcarina_DoNothing(ItemOcarina* this, GlobalContext* globalCtx) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void ItemOcarina_StartSoTCutscene(ItemOcarina* this, GlobalContext* globalCtx) {
|
void ItemOcarina_StartSoTCutscene(ItemOcarina* this, GlobalContext* globalCtx) {
|
||||||
if (Actor_TextboxIsClosing(&this->actor, globalCtx)) {
|
if (Actor_TextboxIsClosing(&this->actor, globalCtx) ||
|
||||||
|
Randomizer_ObtainedFreestandingIceTrap(RC_HF_OCARINA_OF_TIME_ITEM, GI_OCARINA_OOT, &this->actor)) {
|
||||||
if (!gSaveContext.n64ddFlag) {
|
if (!gSaveContext.n64ddFlag) {
|
||||||
globalCtx->csCtx.segment = SEGMENTED_TO_VIRTUAL(gHyruleFieldZeldaSongOfTimeCs);
|
globalCtx->csCtx.segment = SEGMENTED_TO_VIRTUAL(gHyruleFieldZeldaSongOfTimeCs);
|
||||||
gSaveContext.cutsceneTrigger = 1;
|
gSaveContext.cutsceneTrigger = 1;
|
||||||
|
Loading…
Reference in New Issue
Block a user