mirror of
https://github.com/pret/pokeemerald.git
synced 2026-04-26 09:33:41 -05:00
Add gBattleOutcome == B_OUTCOME_DREW to bugfix
Mirroring the change that Nintendo made when rereleasing FRLG on Switch, which addresses the Roamer BUG, they also added a check for B_OUTCOME_DREW.
This commit is contained in:
parent
25ffb2c12c
commit
371708f6d0
|
|
@ -5234,10 +5234,13 @@ static void ReturnFromBattleToOverworld(void)
|
||||||
UpdateRoamerHPStatus(&gEnemyParty[0]);
|
UpdateRoamerHPStatus(&gEnemyParty[0]);
|
||||||
|
|
||||||
#ifndef BUGFIX
|
#ifndef BUGFIX
|
||||||
|
// Bug: When Roar is used by a roamer, gBattleOutcome is B_OUTCOME_PLAYER_TELEPORTED (5),
|
||||||
|
// which deactivates the roamer.
|
||||||
if ((gBattleOutcome & B_OUTCOME_WON) || gBattleOutcome == B_OUTCOME_CAUGHT)
|
if ((gBattleOutcome & B_OUTCOME_WON) || gBattleOutcome == B_OUTCOME_CAUGHT)
|
||||||
#else
|
#else
|
||||||
if ((gBattleOutcome == B_OUTCOME_WON) || gBattleOutcome == B_OUTCOME_CAUGHT) // Bug: When Roar is used by roamer, gBattleOutcome is B_OUTCOME_PLAYER_TELEPORTED (5).
|
if ((gBattleOutcome == B_OUTCOME_WON) || gBattleOutcome == B_OUTCOME_CAUGHT ||
|
||||||
#endif // & with B_OUTCOME_WON (1) will return TRUE and deactivates the roamer.
|
gBattleOutcome == B_OUTCOME_DREW)
|
||||||
|
#endif
|
||||||
SetRoamerInactive();
|
SetRoamerInactive();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user