diff options
author | gAlfonso-bit <83477269+gAlfonso-bit@users.noreply.github.com> | 2021-05-12 15:23:14 -0400 |
---|---|---|
committer | huderlem <huderlem@gmail.com> | 2021-05-13 11:23:42 -0500 |
commit | 9a195c0fef7a47e5ab55c7047d80969c9cd6e44e (patch) | |
tree | 3e3dc68e59440f01ee2176722b81ecb326c145e4 | |
parent | 2be29cdb77afd5ffcb8ce70fbc9bef0c77db556a (diff) |
Cherry-pick roamer bug fix from pokefirered
Adapted https://github.com/pret/pokefirered/blob/master/src/battle_main.c#L3831 to pokeemerald
-rw-r--r-- | src/battle_main.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/battle_main.c b/src/battle_main.c index c74de896e..001e2ec17 100644 --- a/src/battle_main.c +++ b/src/battle_main.c @@ -5148,7 +5148,12 @@ static void ReturnFromBattleToOverworld(void) if (gBattleTypeFlags & BATTLE_TYPE_ROAMER) { UpdateRoamerHPStatus(&gEnemyParty[0]); + +#ifndef 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(); } |