diff options
author | GriffinR <griffin.g.richards@gmail.com> | 2022-01-21 12:48:19 -0500 |
---|---|---|
committer | GriffinR <griffin.g.richards@gmail.com> | 2022-01-21 12:48:19 -0500 |
commit | 3d0326106ed683911da66eee1bf94becadc7a2db (patch) | |
tree | 3b0901917605374b05656eb14f8e06744765af63 /src/field_tasks.c | |
parent | fb81d9ad4a19b7d653e44787e5647bda794757fd (diff) |
Z coord / height -> elevation
Diffstat (limited to 'src/field_tasks.c')
-rw-r--r-- | src/field_tasks.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/field_tasks.c b/src/field_tasks.c index 760d85369..e6197505d 100644 --- a/src/field_tasks.c +++ b/src/field_tasks.c @@ -445,8 +445,8 @@ static void PacifidlogBridgePerStepCallback(u8 taskId) static void TryLowerFortreeBridge(s16 x, s16 y) { - u8 z = PlayerGetZCoord(); - if (!(z & 1)) + u8 elevation = PlayerGetElevation(); + if (!(elevation & 1)) { switch (MapGridGetMetatileIdAt(x, y)) { @@ -462,8 +462,8 @@ static void TryLowerFortreeBridge(s16 x, s16 y) static void TryRaiseFortreeBridge(s16 x, s16 y) { - u8 z = PlayerGetZCoord(); - if (!(z & 1)) + u8 elevation = PlayerGetElevation(); + if (!(elevation & 1)) { switch (MapGridGetMetatileIdAt(x, y)) { @@ -488,7 +488,7 @@ static void FortreeBridgePerStepCallback(u8 taskId) { bool8 isFortreeBridgeCur; bool8 isFortreeBridgePrev; - u8 z, onBridgeElevation; + u8 elevation, onBridgeElevation; s16 x, y, prevX, prevY; s16 *data = gTasks[taskId].data; PlayerGetDestCoords(&x, &y); @@ -520,9 +520,9 @@ static void FortreeBridgePerStepCallback(u8 taskId) isFortreeBridgePrev = MetatileBehavior_IsFortreeBridge(MapGridGetMetatileBehaviorAt(prevX, prevY)); // Make sure player isn't below bridge - z = PlayerGetZCoord(); + elevation = PlayerGetElevation(); onBridgeElevation = FALSE; - if ((u8)(z & 1) == 0) + if ((u8)(elevation & 1) == 0) onBridgeElevation = TRUE; if (onBridgeElevation && (isFortreeBridgeCur == TRUE || isFortreeBridgePrev == TRUE)) |