From 50522fdea49d327361ba19bbc92c9c879343616d Mon Sep 17 00:00:00 2001 From: sphericalice Date: Thu, 30 Dec 2021 12:21:47 +0000 Subject: [PATCH] Remove some magic numbers from TryPushBoulder --- src/field_player_avatar.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/field_player_avatar.c b/src/field_player_avatar.c index 6cf468b3e..3c0276a27 100644 --- a/src/field_player_avatar.c +++ b/src/field_player_avatar.c @@ -735,13 +735,13 @@ static bool8 TryPushBoulder(s16 x, s16 y, u8 direction) { u8 objectEventId = GetObjectEventIdByXY(x, y); - if (objectEventId != 16 && gObjectEvents[objectEventId].graphicsId == OBJ_EVENT_GFX_PUSHABLE_BOULDER) + if (objectEventId != OBJECT_EVENTS_COUNT && gObjectEvents[objectEventId].graphicsId == OBJ_EVENT_GFX_PUSHABLE_BOULDER) { x = gObjectEvents[objectEventId].currentCoords.x; y = gObjectEvents[objectEventId].currentCoords.y; MoveCoords(direction, &x, &y); if (GetCollisionAtCoords(&gObjectEvents[objectEventId], x, y, direction) == COLLISION_NONE - && MetatileBehavior_IsNonAnimDoor(MapGridGetMetatileBehaviorAt(x, y)) == 0) + && MetatileBehavior_IsNonAnimDoor(MapGridGetMetatileBehaviorAt(x, y)) == FALSE) { StartStrengthAnim(objectEventId, direction); return TRUE;