diff options
author | tron <tron@openttd.org> | 2006-05-07 07:55:05 +0000 |
---|---|---|
committer | tron <tron@openttd.org> | 2006-05-07 07:55:05 +0000 |
commit | 5622ad4b5efdba60db4bcfaf03ba358c569064f6 (patch) | |
tree | f5113d4060c886372d1bca9edc9098d07a6dc3e0 /landscape.c | |
parent | 4f092c8de8e30ce4d29165a7d46dd2203c887722 (diff) | |
download | openttd-5622ad4b5efdba60db4bcfaf03ba358c569064f6.tar.xz |
(svn r4765) Add GetTileMaxZ(), which returns the height of the highest corner of a tile, and use it to simplify the code in a few places
Diffstat (limited to 'landscape.c')
-rw-r--r-- | landscape.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/landscape.c b/landscape.c index 53c72dfaf..cc044eab2 100644 --- a/landscape.c +++ b/landscape.c @@ -396,10 +396,9 @@ void InitializeLandscape(void) void ConvertGroundTilesIntoWaterTiles(void) { TileIndex tile = 0; - uint h; for (tile = 0; tile < MapSize(); ++tile) { - if (IsTileType(tile, MP_CLEAR) && GetTileSlope(tile, &h) == SLOPE_FLAT && h == 0) { + if (IsTileType(tile, MP_CLEAR) && GetTileMaxZ(tile) == 0) { MakeWater(tile); } } |