forked from mirror/OpenTTD
(svn r5070) Merged the bridge branch
-Feature: Bridges can now be placed above: Any railway track combination (excluding depots and waypoints) Any road combination (excluding depots) Clear tiles (duh), including fields Tunnel entrances Bridge heads Thanks to Tron for idea and implementation, KUDr for the yapf synchronization and many others for hours of testing There are still a number of visual problems remaining, especially when electric railways are on or under the bridge. DO NOT REPORT THOSE BUGS FOR THE TIME BEING please.
This commit is contained in:
18
road_map.c
18
road_map.c
@@ -27,22 +27,12 @@ RoadBits GetAnyRoadBits(TileIndex tile)
|
||||
return DiagDirToRoadBits(GetRoadStopDir(tile));
|
||||
|
||||
case MP_TUNNELBRIDGE:
|
||||
if (IsBridge(tile)) {
|
||||
if (IsBridgeMiddle(tile)) {
|
||||
if (!IsTransportUnderBridge(tile) ||
|
||||
GetBridgeTransportType(tile) != TRANSPORT_ROAD) {
|
||||
return 0;
|
||||
}
|
||||
return GetRoadBitsUnderBridge(tile);
|
||||
} else {
|
||||
// ending
|
||||
if (GetBridgeTransportType(tile) != TRANSPORT_ROAD) return 0;
|
||||
return DiagDirToRoadBits(ReverseDiagDir(GetBridgeRampDirection(tile)));
|
||||
}
|
||||
} else {
|
||||
// tunnel
|
||||
if (IsTunnel(tile)) {
|
||||
if (GetTunnelTransportType(tile) != TRANSPORT_ROAD) return 0;
|
||||
return DiagDirToRoadBits(ReverseDiagDir(GetTunnelDirection(tile)));
|
||||
} else {
|
||||
if (GetBridgeTransportType(tile) != TRANSPORT_ROAD) return 0;
|
||||
return DiagDirToRoadBits(ReverseDiagDir(GetBridgeRampDirection(tile)));
|
||||
}
|
||||
|
||||
default: return 0;
|
||||
|
Reference in New Issue
Block a user