summaryrefslogtreecommitdiff
path: root/vehicle.c
diff options
context:
space:
mode:
authortron <tron@openttd.org>2005-01-27 12:52:20 +0000
committertron <tron@openttd.org>2005-01-27 12:52:20 +0000
commit63653bd6aff20948868d9d6cf01d00e3a8c31d8f (patch)
tree3d5f382fb85ba8444b4f6b8788fddbaa84031924 /vehicle.c
parent6eec07257a86cb23f1b4efc11e184dff100a452e (diff)
downloadopenttd-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.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/vehicle.c b/vehicle.c
index ffe2e392e..915da38da 100644
--- a/vehicle.c
+++ b/vehicle.c
@@ -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)