From 7cfe21f8651f7c480b5cc867014ad03544268da4 Mon Sep 17 00:00:00 2001 From: lilDavid <1337lilDavid@gmail.com> Date: Sat, 6 Aug 2022 15:58:57 -0500 Subject: [PATCH] Fix non-randomizer carpenter's son despawning --- soh/src/overlays/actors/ovl_En_Hs/z_en_hs.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/soh/src/overlays/actors/ovl_En_Hs/z_en_hs.c b/soh/src/overlays/actors/ovl_En_Hs/z_en_hs.c index 57f954eefb..0ba6aae16f 100644 --- a/soh/src/overlays/actors/ovl_En_Hs/z_en_hs.c +++ b/soh/src/overlays/actors/ovl_En_Hs/z_en_hs.c @@ -79,8 +79,14 @@ void EnHs_Init(Actor* thisx, GlobalContext* globalCtx) { // "chicken shop (adult era)" osSyncPrintf(VT_FGCOL(CYAN) " ヒヨコの店(大人の時) \n" VT_RST); func_80A6E3A0(this, func_80A6E9AC); - if (gSaveContext.itemGetInf[3] & 1 && - (gSaveContext.n64ddFlag && !(gSaveContext.adultTradeItems & ADULT_TRADE_FLAG(ITEM_COJIRO)))) { + bool shouldDespawn; + bool tradedMushroom = gSaveContext.itemGetInf[3] & 1; + if (gSaveContext.n64ddFlag) { + shouldDespawn = tradedMushroom && !(gSaveContext.adultTradeItems & ADULT_TRADE_FLAG(ITEM_COJIRO)) + } else { + shouldDespawn = tradedMushroom; + } + if (shouldDespawn) { // "chicken shop closed" osSyncPrintf(VT_FGCOL(CYAN) " ヒヨコ屋閉店 \n" VT_RST); Actor_Kill(&this->actor);