summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPikalaxALT <pikalaxalt@gmail.com>2020-04-09 11:25:47 -0400
committerPikalaxALT <pikalaxalt@gmail.com>2020-04-09 11:25:47 -0400
commita42e4134af3a8da0cabe18d846ad34469a0ae1e3 (patch)
tree060e17915941ce0ad87ac322c544b8b01fddf69e /src
parenteba370ac3beb2047eb4caf751bcf0dd52febc6f6 (diff)
parenta81edaba1d5e0f84336fd8a57a48b2a970171ba4 (diff)
Merge branch 'master' of github.com:pret/pokefirered into modern_gcc
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 d2735086f..841985c48 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);