diff options
author | rubidium <rubidium@openttd.org> | 2011-11-04 10:28:31 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2011-11-04 10:28:31 +0000 |
commit | f0f17a77bad81ae15de70b4a5bca131561affe05 (patch) | |
tree | 06181a35bda1c6d966b6d85654f4859a5c190403 /src/tunnel_map.cpp | |
parent | d0689c2924bd0c8793a61dfc9407673b1810d051 (diff) | |
download | openttd-f0f17a77bad81ae15de70b4a5bca131561affe05.tar.xz |
(svn r23098) -Codechange: remove pointless multiplications by TILE_HEIGHT from the tunnel code
Diffstat (limited to 'src/tunnel_map.cpp')
-rw-r--r-- | src/tunnel_map.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/tunnel_map.cpp b/src/tunnel_map.cpp index 2aac58424..799b39000 100644 --- a/src/tunnel_map.cpp +++ b/src/tunnel_map.cpp @@ -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; |