mirror of
https://github.com/pret/pokeemerald.git
synced 2026-09-30 22:07:24 -05:00
Fixed bug with followers and cross-map scripting events.
This commit is contained in:
@@ -2064,7 +2064,9 @@ void RemoveObjectEventsOutsideView(void)
|
||||
{
|
||||
struct ObjectEvent *objectEvent = &gObjectEvents[i];
|
||||
|
||||
if (objectEvent->active && !objectEvent->isPlayer)
|
||||
// Followers should not go OOB, or their sprites may be freed early during a cross-map scripting event,
|
||||
// such as Wally's Ralts catch sequence
|
||||
if (objectEvent->active && !objectEvent->isPlayer && objectEvent->localId != OBJ_EVENT_ID_FOLLOWER)
|
||||
RemoveObjectEventIfOutsideView(objectEvent);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user