mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-12-27 04:04:17 +01:00
metatitleBehavior -> metatileBehavior
This commit is contained in:
parent
bc3805f9d3
commit
4be4ec3081
12
src/bike.c
12
src/bike.c
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user