metatitleBehavior -> metatileBehavior

This commit is contained in:
LOuroboros 2023-02-17 16:43:22 -03:00
parent bc3805f9d3
commit 4be4ec3081

View File

@ -863,23 +863,23 @@ static u8 Bike_DPadToDirection(u16 heldKeys)
static u8 GetBikeCollision(u8 direction)
{
u8 metatitleBehavior;
u8 metatileBehavior;
struct ObjectEvent *playerObjEvent = &gObjectEvents[gPlayerAvatar.objectEventId];
s16 x = playerObjEvent->currentCoords.x;
s16 y = playerObjEvent->currentCoords.y;
MoveCoords(direction, &x, &y);
metatitleBehavior = MapGridGetMetatileBehaviorAt(x, y);
return GetBikeCollisionAt(playerObjEvent, x, y, direction, metatitleBehavior);
metatileBehavior = MapGridGetMetatileBehaviorAt(x, y);
return GetBikeCollisionAt(playerObjEvent, x, y, direction, metatileBehavior);
}
static u8 GetBikeCollisionAt(struct ObjectEvent *objectEvent, s16 x, s16 y, u8 direction, u8 metatitleBehavior)
static u8 GetBikeCollisionAt(struct ObjectEvent *objectEvent, s16 x, s16 y, u8 direction, u8 metatileBehavior)
{
u8 collision = CheckForObjectEventCollision(objectEvent, x, y, direction, metatitleBehavior);
u8 collision = CheckForObjectEventCollision(objectEvent, x, y, direction, metatileBehavior);
if (collision > COLLISION_OBJECT_EVENT)
return collision;
if (collision == COLLISION_NONE && IsRunningDisallowedByMetatile(metatitleBehavior))
if (collision == COLLISION_NONE && IsRunningDisallowedByMetatile(metatileBehavior))
collision = COLLISION_IMPASSABLE;
if (collision)