diff options
author | tron <tron@openttd.org> | 2006-06-07 19:35:21 +0000 |
---|---|---|
committer | tron <tron@openttd.org> | 2006-06-07 19:35:21 +0000 |
commit | be88e269b918b365695e84cfa962e8d21b98e759 (patch) | |
tree | 5a6fb4aa93546ad194301d231de10ba5370ccc6f /rail.c | |
parent | ace071529e2116f92aeec50d3bac0f95953b129b (diff) | |
download | openttd-be88e269b918b365695e84cfa962e8d21b98e759.tar.xz |
(svn r5155) - Remove the bridge branch merge (revision r5070)
Diffstat (limited to 'rail.c')
-rw-r--r-- | rail.c | 18 |
1 files changed, 16 insertions, 2 deletions
@@ -104,6 +104,7 @@ 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); @@ -123,8 +124,21 @@ RailType GetTileRailType(TileIndex tile, Trackdir trackdir) return GetRailType(tile); } } else { - if (GetBridgeTransportType(tile) == TRANSPORT_RAIL) { - return GetRailType(tile); + 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); + } + } } } break; |