From 0a67e42f6ceae5c51d23ef1fbf370fb41b1bbd40 Mon Sep 17 00:00:00 2001 From: Adam Bird Date: Sat, 4 Mar 2023 00:30:20 -0500 Subject: [PATCH] handle angry happy mask throwing link out in entrance randomizer (#2578) --- soh/src/overlays/actors/ovl_En_Ossan/z_en_ossan.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/soh/src/overlays/actors/ovl_En_Ossan/z_en_ossan.c b/soh/src/overlays/actors/ovl_En_Ossan/z_en_ossan.c index 1d9ea6608..1e55d073b 100644 --- a/soh/src/overlays/actors/ovl_En_Ossan/z_en_ossan.c +++ b/soh/src/overlays/actors/ovl_En_Ossan/z_en_ossan.c @@ -13,6 +13,7 @@ #include "objects/object_mastergolon/object_mastergolon.h" #include "objects/object_masterzoora/object_masterzoora.h" #include "objects/object_masterkokirihead/object_masterkokirihead.h" +#include "soh/Enhancements/randomizer/randomizer_entrance.h" #define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_3 | ACTOR_FLAG_4) @@ -934,7 +935,12 @@ void EnOssan_State_StartConversation(EnOssan* this, PlayState* play, Player* pla EnOssan_TryPaybackMask(this, play); return; case OSSAN_HAPPY_STATE_ANGRY: - play->nextEntranceIndex = 0x1D1; + // In ER, handle happy mask throwing link out with not enough rupees + if (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHUFFLE_ENTRANCES)) { + play->nextEntranceIndex = Entrance_OverrideNextIndex(0x1D1); + } else { + play->nextEntranceIndex = 0x1D1; + } play->sceneLoadFlag = 0x14; play->fadeTransition = 0x2E; return;