From 3c8ba619131399b6b0b7ff231e7bd0bda2a5b3c5 Mon Sep 17 00:00:00 2001 From: W1serV1ser <1prefertheaircauseimanairnomad@gmail.com> Date: Tue, 28 Mar 2023 23:30:10 -0700 Subject: [PATCH] Fixed specific fly/door glitch Before, if the player stepped out of a door and then immediately flew, the follower would not appear after landing until the player reloaded the map. This fixes that. --- src/field_effect.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/field_effect.c b/src/field_effect.c index eae9f0c75..b2c3eef02 100644 --- a/src/field_effect.c +++ b/src/field_effect.c @@ -1370,8 +1370,16 @@ static void Task_UseFly(u8 taskId) gFieldEffectArguments[0] = 0; FieldEffectStart(FLDEFF_USE_FLY); - FollowerIntoPokeball(); - + + if (gSaveBlock2Ptr->follower.inProgress) + { + // In case the player just exited a building and the follower has not exited the building + gSaveBlock2Ptr->follower.comeOutDoorStairs = 0; + gSaveBlock2Ptr->follower.warpEnd = 0; + + FollowerIntoPokeball(); + } + task->data[0]++; }