(svn r9914) -Codechange: prepare GTTS and the pathfinders to handle multiple road types on a single tile.

This commit is contained in:
rubidium
2007-05-24 22:41:50 +00:00
parent b82676be2a
commit 440d723d84
32 changed files with 108 additions and 81 deletions

View File

@@ -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;
}
}