diff options
author | tron <tron@openttd.org> | 2005-01-27 12:52:20 +0000 |
---|---|---|
committer | tron <tron@openttd.org> | 2005-01-27 12:52:20 +0000 |
commit | 63653bd6aff20948868d9d6cf01d00e3a8c31d8f (patch) | |
tree | 3d5f382fb85ba8444b4f6b8788fddbaa84031924 /vehicle.c | |
parent | 6eec07257a86cb23f1b4efc11e184dff100a452e (diff) | |
download | openttd-63653bd6aff20948868d9d6cf01d00e3a8c31d8f.tar.xz |
(svn r1696) Use GetTileSlope() instead of FindLandscapeHeightByTile() where it is sufficient. FindLandscapeHeightByTile() uses GetTileSlope() internally and adds some more info, which is discarded in these cases.
While touching the code make a bit more clear how GetBridgeHeight() works.
Diffstat (limited to 'vehicle.c')
-rw-r--r-- | vehicle.c | 5 |
1 files changed, 1 insertions, 4 deletions
@@ -82,10 +82,7 @@ static inline uint Correct_Z(uint tileh) uint GetCorrectTileHeight(TileIndex tile) { - TileInfo ti; - - FindLandscapeHeightByTile(&ti, tile); - return Correct_Z(ti.tileh); + return Correct_Z(GetTileSlope(tile, NULL)); } bool EnsureNoVehicleZ(TileIndex tile, byte z) |