summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPikalaxALT <PikalaxALT@gmail.com>2020-04-09 10:22:21 -0400
committerPikalaxALT <PikalaxALT@gmail.com>2020-04-09 10:22:21 -0400
commita53ad6c565178833ad341ebf8117e78f5ecda1ea (patch)
treea4dde07946c8d2589035e125bfa1a7ef67e49476 /src
parentea207f6334676be3abb6a8b03065364fa0027ee1 (diff)
parenta81edaba1d5e0f84336fd8a57a48b2a970171ba4 (diff)
Merge branch 'master' of github.com:pret/pokefirered into various_documentation
Diffstat (limited to 'src')
-rw-r--r--src/battle_main.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/battle_main.c b/src/battle_main.c
index 572dda574..b74600730 100644
--- a/src/battle_main.c
+++ b/src/battle_main.c
@@ -3851,7 +3851,11 @@ static void ReturnFromBattleToOverworld(void)
if (gBattleTypeFlags & BATTLE_TYPE_ROAMER)
{
UpdateRoamerHPStatus(&gEnemyParty[0]);
- if ((gBattleOutcome & B_OUTCOME_WON) || gBattleOutcome == B_OUTCOME_CAUGHT)
+#ifdef BUGFIX
+ if ((gBattleOutcome == B_OUTCOME_WON) || gBattleOutcome == B_OUTCOME_CAUGHT)
+#else
+ if ((gBattleOutcome & B_OUTCOME_WON) || gBattleOutcome == B_OUTCOME_CAUGHT) // Bug: When Roar is used by roamer, gBattleOutcome is B_OUTCOME_PLAYER_TELEPORTED (5).
+#endif // & with B_OUTCOME_WON (1) will return TRUE and deactivates the roamer.
SetRoamerInactive();
}
m4aSongNumStop(SE_HINSI);