diff -r 9cb1a8fd9155 -r 4a72310c9cf5 tile.c --- a/tile.c Sat May 20 20:16:08 2006 +0000 +++ b/tile.c Sat May 20 20:56:31 2006 +0000 @@ -68,3 +68,19 @@ GetTileSlope(tile, &h); return h; } + +uint GetTileMaxZ(TileIndex t) +{ + uint max; + uint h; + + h = TileHeight(t); + max = h; + h = TileHeight(t + TileDiffXY(1, 0)); + if (h > max) max = h; + h = TileHeight(t + TileDiffXY(0, 1)); + if (h > max) max = h; + h = TileHeight(t + TileDiffXY(1, 1)); + if (h > max) max = h; + return max * 8; +}