diff --git a/soh/soh/Enhancements/randomizer/ShufflePots.cpp b/soh/soh/Enhancements/randomizer/ShufflePots.cpp index 3ac19793e03..8659ad2e62a 100644 --- a/soh/soh/Enhancements/randomizer/ShufflePots.cpp +++ b/soh/soh/Enhancements/randomizer/ShufflePots.cpp @@ -69,22 +69,21 @@ void ObjTsubo_RandomizerInit(void* actorRef) { } void PotOnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, void* optionalArg) { - ObjTsubo* potActor = static_cast(optionalArg); - - switch (id) { - case VB_POT_DRAW: { - if (ObjTsubo_RandomizerHoldsItem(potActor, gPlayState)) { - potActor->actor.draw = (ActorFunc)ObjTsubo_RandomizerDraw; - *should = false; - } - break; + // Draw custom model for pot to indicate it holding a randomized item. + if (id == VB_POT_DRAW) { + ObjTsubo* potActor = static_cast(optionalArg); + if (ObjTsubo_RandomizerHoldsItem(potActor, gPlayState)) { + potActor->actor.draw = (ActorFunc)ObjTsubo_RandomizerDraw; + *should = false; } - case VB_POT_DROP_ITEM: { - if (ObjTsubo_RandomizerHoldsItem(potActor, gPlayState)) { - ObjTsubo_RandomizerSpawnCollectible(potActor, gPlayState); - *should = false; - } - break; + } + + // Do not spawn vanilla item from pot, instead spawn the ranomized item. + if (id == VB_POT_DROP_ITEM) { + ObjTsubo* potActor = static_cast(optionalArg); + if (ObjTsubo_RandomizerHoldsItem(potActor, gPlayState)) { + ObjTsubo_RandomizerSpawnCollectible(potActor, gPlayState); + *should = false; } } } diff --git a/soh/soh/Enhancements/randomizer/randomizer.cpp b/soh/soh/Enhancements/randomizer/randomizer.cpp index 48d1e2bf99b..2227bd44580 100644 --- a/soh/soh/Enhancements/randomizer/randomizer.cpp +++ b/soh/soh/Enhancements/randomizer/randomizer.cpp @@ -2270,12 +2270,10 @@ CowIdentity Randomizer::IdentifyCow(s32 sceneNum, s32 posX, s32 posZ) { PotIdentity Randomizer::IdentifyPot(s32 sceneNum, s32 posX, s32 posZ) { struct PotIdentity potIdentity; - uint32_t potSceneNum; + uint32_t potSceneNum = sceneNum; if (sceneNum == SCENE_GANONDORF_BOSS) { potSceneNum = SCENE_GANONS_TOWER; - } else { - potSceneNum = sceneNum; } potIdentity.randomizerInf = RAND_INF_MAX; diff --git a/soh/soh/Enhancements/randomizer/randomizerTypes.h b/soh/soh/Enhancements/randomizer/randomizerTypes.h index b42cbccf9f7..e55dd2efdd3 100644 --- a/soh/soh/Enhancements/randomizer/randomizerTypes.h +++ b/soh/soh/Enhancements/randomizer/randomizerTypes.h @@ -1559,7 +1559,7 @@ typedef enum { RC_GANONS_CASTLE_MQ_DEKU_SCRUB_RIGHT, RC_GANONS_TOWER_BOSS_KEY_CHEST, - // Pots + // Overworld Pots RC_KF_LINKS_HOUSE_POT, RC_KF_TWINS_HOUSE_POT_1, RC_KF_TWINS_HOUSE_POT_2, @@ -1701,6 +1701,8 @@ typedef enum { RC_ZF_NEAR_JABU_POT_2, RC_ZF_NEAR_JABU_POT_3, RC_ZF_NEAR_JABU_POT_4, + + // Dungeon Pots RC_DODONGOS_CAVERN_LIZALFOS_POT_1, RC_DODONGOS_CAVERN_LIZALFOS_POT_2, RC_DODONGOS_CAVERN_LIZALFOS_POT_3, diff --git a/soh/src/overlays/actors/ovl_Obj_Tsubo/z_obj_tsubo.c b/soh/src/overlays/actors/ovl_Obj_Tsubo/z_obj_tsubo.c index d2e9102e7f9..23b02607a84 100644 --- a/soh/src/overlays/actors/ovl_Obj_Tsubo/z_obj_tsubo.c +++ b/soh/src/overlays/actors/ovl_Obj_Tsubo/z_obj_tsubo.c @@ -87,10 +87,11 @@ static InitChainEntry sInitChain[] = { void ObjTsubo_SpawnCollectible(ObjTsubo* this, PlayState* play) { s16 dropParams = this->actor.params & 0x1F; - if ((dropParams >= ITEM00_RUPEE_GREEN) && (dropParams <= ITEM00_BOMBS_SPECIAL) && - GameInteractor_Should(VB_POT_DROP_ITEM, true, this)) { - Item_DropCollectible(play, &this->actor.world.pos, - (dropParams | (((this->actor.params >> 9) & 0x3F) << 8))); + if (GameInteractor_Should(VB_POT_DROP_ITEM, true, this)) { + if ((dropParams >= ITEM00_RUPEE_GREEN) && (dropParams <= ITEM00_BOMBS_SPECIAL)) { + Item_DropCollectible(play, &this->actor.world.pos, + (dropParams | (((this->actor.params >> 9) & 0x3F) << 8))); + } } }