(svn r23098) -Codechange: remove pointless multiplications by TILE_HEIGHT from the tunnel code

This commit is contained in:
rubidium
2011-11-04 10:28:31 +00:00
parent d0689c2924
commit f0f17a77ba
3 changed files with 7 additions and 7 deletions

View File

@@ -23,7 +23,7 @@ TileIndex GetOtherTunnelEnd(TileIndex tile)
{
DiagDirection dir = GetTunnelBridgeDirection(tile);
TileIndexDiff delta = TileOffsByDiagDir(dir);
uint z = GetTilePixelZ(tile);
uint z = GetTileZ(tile);
dir = ReverseDiagDir(dir);
do {
@@ -31,7 +31,7 @@ TileIndex GetOtherTunnelEnd(TileIndex tile)
} while (
!IsTunnelTile(tile) ||
GetTunnelBridgeDirection(tile) != dir ||
GetTilePixelZ(tile) != z
GetTileZ(tile) != z
);
return tile;
@@ -53,7 +53,7 @@ bool IsTunnelInWayDir(TileIndex tile, uint z, DiagDirection dir)
do {
tile -= delta;
if (!IsValidTile(tile)) return false;
height = GetTilePixelZ(tile);
height = GetTileZ(tile);
} while (z < height);
return z == height && IsTunnelTile(tile) && GetTunnelBridgeDirection(tile) == dir;