diff options
author | tron <tron@openttd.org> | 2006-08-06 16:32:49 +0000 |
---|---|---|
committer | tron <tron@openttd.org> | 2006-08-06 16:32:49 +0000 |
commit | 3254155930feb807f81031ebfdc9acedbe33745e (patch) | |
tree | f588dd076c3c98d0c2983a7f5c9e5f5dcbc4447b /clear_cmd.c | |
parent | 7c9165827eb64c74efbad0198e97fe1a77fdb258 (diff) | |
download | openttd-3254155930feb807f81031ebfdc9acedbe33745e.tar.xz |
(svn r5794) Pass the TileIndex plus x and y coordinates into GetSlopeZ_* instead of a TileInfo
Diffstat (limited to 'clear_cmd.c')
-rw-r--r-- | clear_cmd.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/clear_cmd.c b/clear_cmd.c index 1f46a071d..6d1016daa 100644 --- a/clear_cmd.c +++ b/clear_cmd.c @@ -534,9 +534,12 @@ static void DrawTile_Clear(TileInfo *ti) DrawClearLandFence(ti); } -static uint GetSlopeZ_Clear(const TileInfo* ti) +static uint GetSlopeZ_Clear(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_Clear(TileIndex tile, Slope tileh) |