From e8f3dcaa79fdc5fea226fbe8f118d9a121632ef0 Mon Sep 17 00:00:00 2001 From: Ariel A <24759293+aarant@users.noreply.github.com> Date: Tue, 15 Mar 2022 19:58:48 -0400 Subject: [PATCH] Fixed OrbEffect hanging when follower pokemon is out. --- src/field_screen_effect.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/field_screen_effect.c b/src/field_screen_effect.c index 676bebf0df..dc792f2ddb 100644 --- a/src/field_screen_effect.c +++ b/src/field_screen_effect.c @@ -1174,6 +1174,9 @@ static void Task_OrbEffect(u8 taskId) tState = 4; break; case 4: + // If the caller script is delayed after starting the orb effect, a `waitstate` might be reached *after* + // we enable the ScriptContext in case 2; enabling it here as well avoids softlocks in this scenario + EnableBothScriptContexts(); if (--tShakeDelay == 0) { s32 panning;