Sync fieldmap
This commit is contained in:
@@ -4854,7 +4854,7 @@ u8 GetCollisionAtCoords(struct ObjectEvent *objectEvent, s16 x, s16 y, u32 dir)
|
||||
u8 direction = dir;
|
||||
if (IsCoordOutsideObjectEventMovementRange(objectEvent, x, y))
|
||||
return COLLISION_OUTSIDE_RANGE;
|
||||
else if (MapGridIsImpassableAt(x, y) || GetMapBorderIdAt(x, y) == CONNECTION_INVALID || IsMetatileDirectionallyImpassable(objectEvent, x, y, direction))
|
||||
else if (MapGridGetCollisionAt(x, y) || GetMapBorderIdAt(x, y) == CONNECTION_INVALID || IsMetatileDirectionallyImpassable(objectEvent, x, y, direction))
|
||||
return COLLISION_IMPASSABLE;
|
||||
else if (objectEvent->trackedByCamera && !CanCameraMoveInDirection(direction))
|
||||
return COLLISION_IMPASSABLE;
|
||||
@@ -4871,7 +4871,7 @@ u8 GetCollisionFlagsAtCoords(struct ObjectEvent *objectEvent, s16 x, s16 y, u8 d
|
||||
|
||||
if (IsCoordOutsideObjectEventMovementRange(objectEvent, x, y))
|
||||
flags |= 1;
|
||||
if (MapGridIsImpassableAt(x, y) || GetMapBorderIdAt(x, y) == CONNECTION_INVALID || IsMetatileDirectionallyImpassable(objectEvent, x, y, direction) || (objectEvent->trackedByCamera && !CanCameraMoveInDirection(direction)))
|
||||
if (MapGridGetCollisionAt(x, y) || GetMapBorderIdAt(x, y) == CONNECTION_INVALID || IsMetatileDirectionallyImpassable(objectEvent, x, y, direction) || (objectEvent->trackedByCamera && !CanCameraMoveInDirection(direction)))
|
||||
flags |= 2;
|
||||
if (IsZCoordMismatchAt(objectEvent->currentElevation, x, y))
|
||||
flags |= 4;
|
||||
@@ -8380,7 +8380,7 @@ bool8 IsZCoordMismatchAt(u8 z, s16 x, s16 y)
|
||||
if (z == 0)
|
||||
return FALSE;
|
||||
|
||||
mapZ = MapGridGetZCoordAt(x, y);
|
||||
mapZ = MapGridGetElevationAt(x, y);
|
||||
|
||||
if (mapZ == 0 || mapZ == 0xF)
|
||||
return FALSE;
|
||||
@@ -8433,8 +8433,8 @@ u8 ZCoordToPriority(u8 z)
|
||||
|
||||
void ObjectEventUpdateZCoord(struct ObjectEvent *objEvent)
|
||||
{
|
||||
u8 z = MapGridGetZCoordAt(objEvent->currentCoords.x, objEvent->currentCoords.y);
|
||||
u8 z2 = MapGridGetZCoordAt(objEvent->previousCoords.x, objEvent->previousCoords.y);
|
||||
u8 z = MapGridGetElevationAt(objEvent->currentCoords.x, objEvent->currentCoords.y);
|
||||
u8 z2 = MapGridGetElevationAt(objEvent->previousCoords.x, objEvent->previousCoords.y);
|
||||
|
||||
if (z == 0xF || z2 == 0xF)
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user