diff options
Diffstat (limited to 'src/elrail.cpp')
-rw-r--r-- | src/elrail.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/elrail.cpp b/src/elrail.cpp index a0a0bbdf9..69aa9259f 100644 --- a/src/elrail.cpp +++ b/src/elrail.cpp @@ -176,7 +176,7 @@ static void DrawCatenaryRailway(const TileInfo *ti) for (i = DIAGDIR_NE; i < DIAGDIR_END; i++) { TileIndex neighbour = ti->tile + TileOffsByDiagDir(i); - uint foundation = 0; + Foundation foundation = FOUNDATION_NONE; int k; /* Here's one of the main headaches. GetTileSlope does not correct for possibly @@ -225,9 +225,7 @@ static void DrawCatenaryRailway(const TileInfo *ti) foundation = GetBridgeFoundation(tileh[TS_NEIGHBOUR], DiagDirToAxis(GetBridgeRampDirection(neighbour))); } - if (foundation != 0) { - tileh[TS_NEIGHBOUR] = foundation < 15 ? SLOPE_FLAT : _inclined_tileh[foundation - 15]; - } + ApplyFoundationToSlope(foundation, &tileh[TS_NEIGHBOUR]); AdjustTileh(neighbour, &tileh[TS_NEIGHBOUR]); |