diff options
| author | Garrett Cox <garrettjcox@gmail.com> | 2026-07-25 09:35:00 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-07-25 10:35:00 -0400 |
| commit | cb0bab40d4f2fa497f1e3ece65df25e92dd50203 (patch) | |
| tree | aae72779d94c5e70affdef473ecd2a2f5812f98d | |
| parent | f11371f75e3a2f252a14d253311bd291b2110863 (diff) | |
Fix static trap models leaking, and shop items not converting junk (#1811)
Co-authored-by: Eblo <7004497+Eblo@users.noreply.github.com>
| -rw-r--r-- | mm/2s2h/Rando/ActorBehavior/EnGirlA.cpp | 5 | ||||
| -rw-r--r-- | mm/2s2h/Rando/ConvertItem.cpp | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/mm/2s2h/Rando/ActorBehavior/EnGirlA.cpp b/mm/2s2h/Rando/ActorBehavior/EnGirlA.cpp index 9da237c37..51800b327 100644 --- a/mm/2s2h/Rando/ActorBehavior/EnGirlA.cpp +++ b/mm/2s2h/Rando/ActorBehavior/EnGirlA.cpp @@ -75,11 +75,14 @@ s32 EnGirlA_RandoCanBuyFunc(PlayState* play, EnGirlA* enGirlA) { void EnGirlA_RandoBuyFunc(PlayState* play, EnGirlA* enGirlA) { auto& randoSaveCheck = RANDO_SAVE_CHECKS[enGirlA->actor.world.rot.z]; - RandoItemId randoItemId = Rando::ConvertItem(randoSaveCheck.randoItemId, (RandoCheckId)enGirlA->actor.world.rot.z); + RandoCheckId randoCheckId = (RandoCheckId)enGirlA->actor.world.rot.z; + RandoItemId randoItemId = Rando::ConvertItem(randoSaveCheck.randoItemId, randoCheckId); randoSaveCheck.obtained = randoSaveCheck.cycleObtained = true; Rupees_ChangeBy(-play->msgCtx.unk1206C); if (randoItemId == RI_TRAP) { RollTrapType(); + } else if (randoItemId == RI_JUNK) { + randoItemId = Rando::CurrentJunkItem(randoCheckId); } Rando::GiveItem(randoItemId); } diff --git a/mm/2s2h/Rando/ConvertItem.cpp b/mm/2s2h/Rando/ConvertItem.cpp index 13fc338d4..27a811764 100644 --- a/mm/2s2h/Rando/ConvertItem.cpp +++ b/mm/2s2h/Rando/ConvertItem.cpp @@ -146,6 +146,8 @@ static RegisterShipInitFunc refreshInitFunc( RefreshObtainableTrapItems(); }); + allTrapItems.clear(); + if (IS_RANDO) { for (auto& [randoCheckId, _] : Rando::StaticData::Checks) { RandoSaveCheck saveCheck = RANDO_SAVE_CHECKS[randoCheckId]; |
