diff options
Diffstat (limited to 'src/field_control_avatar.c')
-rw-r--r-- | src/field_control_avatar.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/field_control_avatar.c b/src/field_control_avatar.c index 1dce3169e..c52f5190f 100644 --- a/src/field_control_avatar.c +++ b/src/field_control_avatar.c @@ -266,7 +266,7 @@ const u8 *GetInteractedLinkPlayerScript(struct MapPosition *position, u8 metatil else eventObjectId = GetEventObjectIdByXYZ(position->x + gDirectionToVectors[direction].x, position->y + gDirectionToVectors[direction].y, position->height); - if (eventObjectId == 16 || gEventObjects[eventObjectId].localId == INVALID_U8) + if (eventObjectId == 16 || gEventObjects[eventObjectId].localId == 0xFF) return NULL; for (i = 0; i < 4; i++) @@ -287,14 +287,14 @@ static const u8 *GetInteractedEventObjectScript(struct MapPosition *position, u8 const u8 *script; eventObjectId = GetEventObjectIdByXYZ(position->x, position->y, position->height); - if (eventObjectId == 16 || gEventObjects[eventObjectId].localId == INVALID_U8) + if (eventObjectId == 16 || gEventObjects[eventObjectId].localId == 0xFF) { if (MetatileBehavior_IsCounter(metatileBehavior) != TRUE) return NULL; // Look for an event object on the other side of the counter. eventObjectId = GetEventObjectIdByXYZ(position->x + gDirectionToVectors[direction].x, position->y + gDirectionToVectors[direction].y, position->height); - if (eventObjectId == 16 || gEventObjects[eventObjectId].localId == INVALID_U8) + if (eventObjectId == 16 || gEventObjects[eventObjectId].localId == 0xFF) return NULL; } |