summaryrefslogtreecommitdiff
path: root/tree_cmd.c
diff options
context:
space:
mode:
Diffstat (limited to 'tree_cmd.c')
-rw-r--r--tree_cmd.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/tree_cmd.c b/tree_cmd.c
index 9caf6b9d6..99b2de384 100644
--- a/tree_cmd.c
+++ b/tree_cmd.c
@@ -323,9 +323,12 @@ static void DrawTile_Trees(TileInfo *ti)
}
-static uint GetSlopeZ_Trees(const TileInfo* ti)
+static uint GetSlopeZ_Trees(TileIndex tile, uint x, uint y)
{
- return GetPartialZ(ti->x & 0xF, ti->y & 0xF, ti->tileh) + ti->z;
+ uint z;
+ uint tileh = GetTileSlope(tile, &z);
+
+ return z + GetPartialZ(x & 0xF, y & 0xF, tileh);
}
static Slope GetSlopeTileh_Trees(TileIndex tile, Slope tileh)