summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Leggett <chris@leggett.dev>2026-03-24 19:37:21 +0000
committerGitHub <noreply@github.com>2026-03-24 19:37:21 +0000
commit5e13570b8375a3ad5d85120deacaa879027c7b48 (patch)
tree2704fbe0896934a3f7669115521f6acc70f50ee0
parent5fe4680a20946ec7fa09299af3e7ad9d114eae24 (diff)
Fix leak of shuffled fairy bottle-swipe behavior to other actors (#6405)
-rw-r--r--soh/soh/Enhancements/randomizer/ShuffleFairies.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/soh/soh/Enhancements/randomizer/ShuffleFairies.cpp b/soh/soh/Enhancements/randomizer/ShuffleFairies.cpp
index 37e1d07be..730366949 100644
--- a/soh/soh/Enhancements/randomizer/ShuffleFairies.cpp
+++ b/soh/soh/Enhancements/randomizer/ShuffleFairies.cpp
@@ -106,11 +106,13 @@ void RegisterShuffleFairies() {
COND_VB_SHOULD(VB_BOTTLE_ACTOR, shouldRegister, {
Actor* actor = va_arg(args, Actor*);
- const auto fairyIdentity = ObjectExtension::GetInstance().Get<CheckIdentity>(actor);
- if (fairyIdentity != nullptr && fairyIdentity->randomizerInf != RAND_INF_MAX) {
- Flags_SetRandomizerInf(fairyIdentity->randomizerInf);
- actor->parent = &GET_PLAYER(gPlayState)->actor;
- *should = false;
+ if (actor->id == ACTOR_EN_ELF) {
+ const auto fairyIdentity = ObjectExtension::GetInstance().Get<CheckIdentity>(actor);
+ if (fairyIdentity != nullptr && fairyIdentity->randomizerInf != RAND_INF_MAX) {
+ Flags_SetRandomizerInf(fairyIdentity->randomizerInf);
+ actor->parent = &GET_PLAYER(gPlayState)->actor;
+ *should = false;
+ }
}
});