diff options
author | celestar <celestar@openttd.org> | 2006-12-27 12:38:02 +0000 |
---|---|---|
committer | celestar <celestar@openttd.org> | 2006-12-27 12:38:02 +0000 |
commit | d95e2c2dd10a0dfc1704962a68a2bd32b635d158 (patch) | |
tree | 28100daed109de06e979123edd0601487ecc8261 /rail.c | |
parent | d92103d6ff97ae413e2e6eae602e04b05addaf17 (diff) | |
download | openttd-d95e2c2dd10a0dfc1704962a68a2bd32b635d158.tar.xz |
(svn r7573) -Merged the bridge branch. Allows to build bridges of arbitrary rail/road combinations (including signals)
Diffstat (limited to 'rail.c')
-rw-r--r-- | rail.c | 22 |
1 files changed, 2 insertions, 20 deletions
@@ -104,7 +104,6 @@ const Trackdir _dir_to_diag_trackdir[] = { RailType GetTileRailType(TileIndex tile, Trackdir trackdir) { - DiagDirection exitdir = TrackdirToExitdir(trackdir); switch (GetTileType(tile)) { case MP_RAILWAY: return GetRailType(tile); @@ -120,26 +119,9 @@ RailType GetTileRailType(TileIndex tile, Trackdir trackdir) case MP_TUNNELBRIDGE: if (IsTunnel(tile)) { - if (GetTunnelTransportType(tile) == TRANSPORT_RAIL) { - return GetRailType(tile); - } + if (GetTunnelTransportType(tile) == TRANSPORT_RAIL) return GetRailType(tile); } else { - if (IsBridgeRamp(tile)) { - if (GetBridgeTransportType(tile) == TRANSPORT_RAIL) { - return GetRailType(tile); - } - } else { - if (GetBridgeAxis(tile) == DiagDirToAxis(exitdir)) { - if (GetBridgeTransportType(tile) == TRANSPORT_RAIL) { - return GetRailTypeOnBridge(tile); - } - } else { - if (IsTransportUnderBridge(tile) && - GetTransportTypeUnderBridge(tile) == TRANSPORT_RAIL) { - return GetRailType(tile); - } - } - } + if (GetBridgeTransportType(tile) == TRANSPORT_RAIL) return GetRailType(tile); } break; |