Cherry-pick roamer bug fix from pokefirered
Adapted https://github.com/pret/pokefirered/blob/master/src/battle_main.c#L3831 to pokeemerald
This commit is contained in:
parent
2be29cdb77
commit
9a195c0fef
1 changed files with 5 additions and 0 deletions
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue