equal
deleted
inserted
replaced
1234 { |
1234 { |
1235 /* not used */ |
1235 /* not used */ |
1236 } |
1236 } |
1237 |
1237 |
1238 |
1238 |
1239 static uint32 GetTileTrackStatus_TunnelBridge(TileIndex tile, TransportType mode) |
1239 static uint32 GetTileTrackStatus_TunnelBridge(TileIndex tile, TransportType mode, uint sub_mode) |
1240 { |
1240 { |
1241 if (IsTunnel(tile)) { |
1241 if (IsTunnel(tile)) { |
1242 if (GetTunnelTransportType(tile) != mode) return 0; |
1242 if (GetTunnelTransportType(tile) != mode) return 0; |
|
1243 if (GetTunnelTransportType(tile) == TRANSPORT_ROAD && (GetRoadTypes(tile) & sub_mode) == 0) return 0; |
1243 return AxisToTrackBits(DiagDirToAxis(GetTunnelDirection(tile))) * 0x101; |
1244 return AxisToTrackBits(DiagDirToAxis(GetTunnelDirection(tile))) * 0x101; |
1244 } else { |
1245 } else { |
1245 if (GetBridgeTransportType(tile) != mode) return 0; |
1246 if (GetBridgeTransportType(tile) != mode) return 0; |
|
1247 if (GetBridgeTransportType(tile) == TRANSPORT_ROAD && (GetRoadTypes(tile) & sub_mode) == 0) return 0; |
1246 return AxisToTrackBits(DiagDirToAxis(GetBridgeRampDirection(tile))) * 0x101; |
1248 return AxisToTrackBits(DiagDirToAxis(GetBridgeRampDirection(tile))) * 0x101; |
1247 } |
1249 } |
1248 } |
1250 } |
1249 |
1251 |
1250 static void ChangeTileOwner_TunnelBridge(TileIndex tile, PlayerID old_player, PlayerID new_player) |
1252 static void ChangeTileOwner_TunnelBridge(TileIndex tile, PlayerID old_player, PlayerID new_player) |