summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcelestar <celestar@openttd.org>2006-03-30 09:26:17 +0000
committercelestar <celestar@openttd.org>2006-03-30 09:26:17 +0000
commit5476fd4b961ab4fce8a3417c0f2c517aa28e6219 (patch)
treeed2ebaafd3e9655815318200e1173face244e571
parent410b5569fe85ee1c34fbcadd39d8c78801133411 (diff)
downloadopenttd-5476fd4b961ab4fce8a3417c0f2c517aa28e6219.tar.xz
(svn r4165) -Do not use GetBridgeAxis on bridge ramps (request by Tron)
-rw-r--r--elrail.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/elrail.c b/elrail.c
index 1e8fea803..53c246df7 100644
--- a/elrail.c
+++ b/elrail.c
@@ -95,7 +95,7 @@ static TrackBits GetRailTrackBitsUniversal(TileIndex t, byte *override)
} else {
if (override != NULL && DistanceMax(t, GetOtherBridgeEnd(t)) > 1) *override = 1 << GetBridgeRampDirection(t);
- return GetBridgeAxis(t) == AXIS_X ? TRACK_BIT_X : TRACK_BIT_Y;
+ return DiagDirToAxis(GetBridgeRampDirection(t)) == AXIS_X ? TRACK_BIT_X : TRACK_BIT_Y;
}
}
case MP_STREET:
@@ -196,7 +196,10 @@ static void DrawCatenaryRailway(const TileInfo *ti)
/* Read the foundataions if they are present, and adjust the tileh */
if (IsTileType(neighbour, MP_RAILWAY)) foundation = GetRailFoundation(tileh[TS_NEIGHBOUR], trackconfig[TS_NEIGHBOUR]);
- if (IsBridgeTile(neighbour) && IsBridgeRamp(neighbour)) foundation = GetBridgeFoundation(tileh[TS_NEIGHBOUR], GetBridgeAxis(neighbour));
+ if (IsBridgeTile(neighbour) && IsBridgeRamp(neighbour)) {
+ foundation = GetBridgeFoundation(tileh[TS_NEIGHBOUR], DiagDirToAxis(GetBridgeRampDirection(neighbour)));
+ }
+
if (foundation != 0) {
if (foundation < 15) {
tileh[TS_NEIGHBOUR] = 0;