summaryrefslogtreecommitdiff
path: root/src/field_tasks.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/field_tasks.c')
-rw-r--r--src/field_tasks.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/field_tasks.c b/src/field_tasks.c
index 244036471..8e8875993 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))