diff --git a/soh/soh.vcxproj.filters b/soh/soh.vcxproj.filters index 24b65d11f7a..55ca3d1d311 100644 --- a/soh/soh.vcxproj.filters +++ b/soh/soh.vcxproj.filters @@ -1241,4 +1241,4 @@ - \ No newline at end of file + diff --git a/soh/soh/Enhancements/randomizer.cpp b/soh/soh/Enhancements/randomizer.cpp index c81916b5eae..ac64610bf5b 100644 --- a/soh/soh/Enhancements/randomizer.cpp +++ b/soh/soh/Enhancements/randomizer.cpp @@ -842,6 +842,8 @@ RandomizerCheck Randomizer::GetCheckFromSceneAndParams(s16 sceneNum, s16 actorPa } case 96: switch(actorParams) { + case 6: + return DMT_FREESTANDING_POH; case 23201: return DMT_CHEST; } diff --git a/soh/src/code/z_en_item00.c b/soh/src/code/z_en_item00.c index d0179a5e1d5..78c1442093a 100644 --- a/soh/src/code/z_en_item00.c +++ b/soh/src/code/z_en_item00.c @@ -332,6 +332,11 @@ void EnItem00_SetupAction(EnItem00* this, EnItem00ActionFunc actionFunc) { this->actionFunc = actionFunc; } +s32 Item00_GetRandomizedItemId(EnItem00* this, s16 sceneNum, s16 actorParams) { + s32 itemId = GetItemFromSceneAndParams(sceneNum, this->actor.params, this->getItemId); + return itemId; +} + void EnItem00_Init(Actor* thisx, GlobalContext* globalCtx) { EnItem00* this = (EnItem00*)thisx; s32 pad; @@ -690,6 +695,7 @@ void EnItem00_Init(Actor* thisx, GlobalContext* globalCtx) { } if ((getItemId != GI_NONE) && !Actor_HasParent(&this->actor, globalCtx)) { + getItemId = Item00_GetRandomizedItemId(this, globalCtx->sceneNum, this->actor.params); func_8002F554(&this->actor, globalCtx, getItemId); } @@ -1049,6 +1055,9 @@ void EnItem00_Update(Actor* thisx, GlobalContext* globalCtx) { params = &this->actor.params; if ((getItemId != GI_NONE) && !Actor_HasParent(&this->actor, globalCtx)) { + if (gSaveContext.n64ddFlag) { + getItemId = Item00_GetRandomizedItemId(this, globalCtx->sceneNum, this->actor.params); + } func_8002F554(&this->actor, globalCtx, getItemId); } diff --git a/soh/src/overlays/actors/ovl_En_Niw_Lady/z_en_niw_lady.c b/soh/src/overlays/actors/ovl_En_Niw_Lady/z_en_niw_lady.c index 6543e69c863..07369ffa731 100644 --- a/soh/src/overlays/actors/ovl_En_Niw_Lady/z_en_niw_lady.c +++ b/soh/src/overlays/actors/ovl_En_Niw_Lady/z_en_niw_lady.c @@ -393,7 +393,8 @@ void func_80ABA9B8(EnNiwLady* this, GlobalContext* globalCtx) { case 0: Message_CloseTextbox(globalCtx); this->actor.parent = NULL; - func_8002F434(&this->actor, globalCtx, GI_POCKET_EGG, 200.0f, 100.0f); + func_8002F434(&this->actor, globalCtx, NiwLady_GetRandomizedItemId(this, GI_POCKET_EGG), 200.0f, + 100.0f); this->actionFunc = func_80ABAC00; break; case 1: diff --git a/soh/src/overlays/actors/ovl_player_actor/z_player.c b/soh/src/overlays/actors/ovl_player_actor/z_player.c index d6154bfded4..66cd1e3d6b9 100644 --- a/soh/src/overlays/actors/ovl_player_actor/z_player.c +++ b/soh/src/overlays/actors/ovl_player_actor/z_player.c @@ -6155,7 +6155,7 @@ s32 func_8083E5A8(Player* this, GlobalContext* globalCtx) { iREG(67) = false; - if ((Item_CheckObtainability(giEntry->itemId) == ITEM_NONE) || (globalCtx->sceneNum == SCENE_BOWLING)) { + if ((Item_CheckObtainability(giEntry->itemId) == ITEM_NONE) || (globalCtx->sceneNum == SCENE_BOWLING) || gSaveContext.n64ddFlag) { func_808323B4(globalCtx, this); func_8083AE40(this, giEntry->objectId);