Fixed GetFollowerObject
being able to sometimes return removed/inactive objects.
This commit is contained in:
parent
2bc5da3f2f
commit
5e1c6e0f25
1 changed files with 1 additions and 1 deletions
|
@ -1680,7 +1680,7 @@ struct Pokemon * GetFirstLiveMon(void) { // Return address of first conscious pa
|
|||
struct ObjectEvent * GetFollowerObject(void) { // Return follower ObjectEvent or NULL
|
||||
u8 i;
|
||||
for (i=0; i < OBJECT_EVENTS_COUNT; i++) {
|
||||
if (gObjectEvents[i].localId == OBJ_EVENT_ID_FOLLOWER)
|
||||
if (gObjectEvents[i].localId == OBJ_EVENT_ID_FOLLOWER && gObjectEvents[i].active)
|
||||
return &gObjectEvents[i];
|
||||
}
|
||||
return NULL;
|
||||
|
|
Loading…
Reference in a new issue