summaryrefslogtreecommitdiff
path: root/src/tunnelbridge_cmd.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2007-05-24 22:41:50 +0000
committerrubidium <rubidium@openttd.org>2007-05-24 22:41:50 +0000
commit440d723d842db2f246428de2e404091e074ed254 (patch)
tree4ec491716328387ce65a5c1f45b836b6f5f57ce2 /src/tunnelbridge_cmd.cpp
parentb82676be2a39adeb883f9dd5c67125eec12f2753 (diff)
downloadopenttd-440d723d842db2f246428de2e404091e074ed254.tar.xz
(svn r9914) -Codechange: prepare GTTS and the pathfinders to handle multiple road types on a single tile.
Diffstat (limited to 'src/tunnelbridge_cmd.cpp')
-rw-r--r--src/tunnelbridge_cmd.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/tunnelbridge_cmd.cpp b/src/tunnelbridge_cmd.cpp
index 2c098a912..ce5803f75 100644
--- a/src/tunnelbridge_cmd.cpp
+++ b/src/tunnelbridge_cmd.cpp
@@ -1236,13 +1236,15 @@ static void ClickTile_TunnelBridge(TileIndex tile)
}
-static uint32 GetTileTrackStatus_TunnelBridge(TileIndex tile, TransportType mode)
+static uint32 GetTileTrackStatus_TunnelBridge(TileIndex tile, TransportType mode, uint sub_mode)
{
if (IsTunnel(tile)) {
if (GetTunnelTransportType(tile) != mode) return 0;
+ if (GetTunnelTransportType(tile) == TRANSPORT_ROAD && (GetRoadTypes(tile) & sub_mode) == 0) return 0;
return AxisToTrackBits(DiagDirToAxis(GetTunnelDirection(tile))) * 0x101;
} else {
if (GetBridgeTransportType(tile) != mode) return 0;
+ if (GetBridgeTransportType(tile) == TRANSPORT_ROAD && (GetRoadTypes(tile) & sub_mode) == 0) return 0;
return AxisToTrackBits(DiagDirToAxis(GetBridgeRampDirection(tile))) * 0x101;
}
}