diff options
author | tron <tron@openttd.org> | 2005-01-27 15:30:34 +0000 |
---|---|---|
committer | tron <tron@openttd.org> | 2005-01-27 15:30:34 +0000 |
commit | eebb2f196dfb1fdb88e4cf1aef2926ef6bdc8f5a (patch) | |
tree | f8fbca14cae33e1126d9a16f6b085832050bb218 | |
parent | 63653bd6aff20948868d9d6cf01d00e3a8c31d8f (diff) | |
download | openttd-eebb2f196dfb1fdb88e4cf1aef2926ef6bdc8f5a.tar.xz |
(svn r1697) Remove superflous special case for the VOID border tiles in FindLandscapeHeightByTile()
While here clean up some other stuff: uint -> TileIndex, assert() that the TileIndex is valid and remove a line which was already commented out
-rw-r--r-- | landscape.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/landscape.c b/landscape.c index 4d8835343..18e51ebd6 100644 --- a/landscape.c +++ b/landscape.c @@ -80,22 +80,14 @@ int GetTileZ(uint tile) return h; } -void FindLandscapeHeightByTile(TileInfo *ti, uint tile) +void FindLandscapeHeightByTile(TileInfo *ti, TileIndex tile) { - if (TileX(tile) == MapMaxX() || TileY(tile) == MapMaxY()) { - ti->tileh = 0; - ti->type = MP_VOID; - ti->tile = 0; - ti->map5 = 0; - ti->z = 0; - return; - } + assert(tile < MapSize()); ti->tile = tile; ti->map5 = _map5[tile]; ti->type = TileType(tile); ti->tileh = GetTileSlope(tile, &ti->z); -// ti->z = min * 8; } /* find the landscape height for the coordinates x y */ |