(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.
This commit is contained in:
tron
2005-01-27 12:52:20 +00:00
parent 697b619ac1
commit 372b9cb827
3 changed files with 10 additions and 19 deletions

View File

@@ -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)