Fix leak of shuffled fairy bottle-swipe behavior to other actors (#6405)

This commit is contained in:
Christopher Leggett
2026-03-24 19:37:21 +00:00
committed by GitHub
parent 5fe4680a20
commit 5e13570b83

View File

@@ -106,11 +106,13 @@ void RegisterShuffleFairies() {
COND_VB_SHOULD(VB_BOTTLE_ACTOR, shouldRegister, { COND_VB_SHOULD(VB_BOTTLE_ACTOR, shouldRegister, {
Actor* actor = va_arg(args, Actor*); Actor* actor = va_arg(args, Actor*);
const auto fairyIdentity = ObjectExtension::GetInstance().Get<CheckIdentity>(actor); if (actor->id == ACTOR_EN_ELF) {
if (fairyIdentity != nullptr && fairyIdentity->randomizerInf != RAND_INF_MAX) { const auto fairyIdentity = ObjectExtension::GetInstance().Get<CheckIdentity>(actor);
Flags_SetRandomizerInf(fairyIdentity->randomizerInf); if (fairyIdentity != nullptr && fairyIdentity->randomizerInf != RAND_INF_MAX) {
actor->parent = &GET_PLAYER(gPlayState)->actor; Flags_SetRandomizerInf(fairyIdentity->randomizerInf);
*should = false; actor->parent = &GET_PLAYER(gPlayState)->actor;
*should = false;
}
} }
}); });