summaryrefslogtreecommitdiff
path: root/road_map.c
diff options
context:
space:
mode:
authorcelestar <celestar@openttd.org>2006-06-02 13:05:41 +0000
committercelestar <celestar@openttd.org>2006-06-02 13:05:41 +0000
commit25a63ec7af6fadb2d33ef84f79597c14b10e7f39 (patch)
treed5df4e2831609eca45d7ea4558e09a600089ead2 /road_map.c
parentd680fcec772d422b88ea4802add2e6195c6327a2 (diff)
downloadopenttd-25a63ec7af6fadb2d33ef84f79597c14b10e7f39.tar.xz
(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.
Diffstat (limited to 'road_map.c')
-rw-r--r--road_map.c18
1 files changed, 4 insertions, 14 deletions
diff --git a/road_map.c b/road_map.c
index 8702f7692..1c1040476 100644
--- a/road_map.c
+++ b/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;