summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormichi_cc <michi_cc@openttd.org>2012-12-21 18:51:06 +0000
committermichi_cc <michi_cc@openttd.org>2012-12-21 18:51:06 +0000
commitcf570106a6f394fe9e4e54e646ca36b0b1f94eb4 (patch)
tree07c75b300078f4a0ad4b38e5bd84c3d918f6cc0c
parentcaae92787272dc9f70e77e72660d792cb94668a7 (diff)
downloadopenttd-cf570106a6f394fe9e4e54e646ca36b0b1f94eb4.tar.xz
(svn r24836) -Feature(ette): Improve pylon placement around station tiles that display neither pylons nor catenary.
-rw-r--r--src/elrail.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/elrail.cpp b/src/elrail.cpp
index 5d4a4a6a9..2a0a68de3 100644
--- a/src/elrail.cpp
+++ b/src/elrail.cpp
@@ -323,6 +323,9 @@ static void DrawCatenaryRailway(const TileInfo *ti)
wireconfig[TS_NEIGHBOUR] = MaskWireBits(neighbour, trackconfig[TS_NEIGHBOUR]);
if (IsTunnelTile(neighbour) && i != GetTunnelBridgeDirection(neighbour)) wireconfig[TS_NEIGHBOUR] = trackconfig[TS_NEIGHBOUR] = TRACK_BIT_NONE;
+ /* Ignore station tiles that allow neither wires nor pylons. */
+ if (IsRailStationTile(neighbour) && !CanStationTileHavePylons(neighbour) && !CanStationTileHaveWires(neighbour)) wireconfig[TS_NEIGHBOUR] = trackconfig[TS_NEIGHBOUR] = TRACK_BIT_NONE;
+
/* If the neighboured tile does not smoothly connect to the current tile (because of a foundation),
* we have to draw all pillars on the current tile. */
if (elevation != GetPCPElevation(neighbour, ReverseDiagDir(i))) wireconfig[TS_NEIGHBOUR] = trackconfig[TS_NEIGHBOUR] = TRACK_BIT_NONE;