diff --git a/src/event_object_movement.c b/src/event_object_movement.c index b4f3d7fa72..9df072d954 100644 --- a/src/event_object_movement.c +++ b/src/event_object_movement.c @@ -1686,7 +1686,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; @@ -1776,7 +1776,8 @@ void UpdateFollowingPokemon(void) { // Update following pokemon if any .graphicsId = OBJ_EVENT_GFX_OW_MON, .x = gSaveBlock1Ptr->pos.x, .y = gSaveBlock1Ptr->pos.y, - .elevation = 3, + // If player active, copy player elevation + .elevation = gObjectEvents[gPlayerAvatar.objectEventId].active ? gObjectEvents[gPlayerAvatar.objectEventId].currentElevation : 3, .movementType = MOVEMENT_TYPE_FOLLOW_PLAYER, }; objEvent = &gObjectEvents[SpawnSpecialObjectEvent(&template)];