changed remove check from objId to localId for npc followers

This commit is contained in:
Bivurnum 2025-04-28 10:58:35 -05:00
parent 96a8035dec
commit 49ae82c679

View File

@ -2783,8 +2783,7 @@ void RemoveObjectEventsOutsideView(void)
// 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
&& (PlayerHasFollowerNPC() && i != GetFollowerNPCObjectId())
)
&& objectEvent->localId != OBJ_EVENT_ID_NPC_FOLLOWER)
RemoveObjectEventIfOutsideView(objectEvent);
}
}