Fix leak of shuffled fairy bottle-swipe behavior to other actors (#6405)
This commit is contained in:
committed by
GitHub
parent
5fe4680a20
commit
5e13570b83
@@ -106,12 +106,14 @@ 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*);
|
||||||
|
if (actor->id == ACTOR_EN_ELF) {
|
||||||
const auto fairyIdentity = ObjectExtension::GetInstance().Get<CheckIdentity>(actor);
|
const auto fairyIdentity = ObjectExtension::GetInstance().Get<CheckIdentity>(actor);
|
||||||
if (fairyIdentity != nullptr && fairyIdentity->randomizerInf != RAND_INF_MAX) {
|
if (fairyIdentity != nullptr && fairyIdentity->randomizerInf != RAND_INF_MAX) {
|
||||||
Flags_SetRandomizerInf(fairyIdentity->randomizerInf);
|
Flags_SetRandomizerInf(fairyIdentity->randomizerInf);
|
||||||
actor->parent = &GET_PLAYER(gPlayState)->actor;
|
actor->parent = &GET_PLAYER(gPlayState)->actor;
|
||||||
*should = false;
|
*should = false;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// Spawn fairies in fairy fountains
|
// Spawn fairies in fairy fountains
|
||||||
|
|||||||
Reference in New Issue
Block a user