summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2007-06-22 21:48:41 +0000
committerrubidium <rubidium@openttd.org>2007-06-22 21:48:41 +0000
commita56661fcc17134a26bf2df5cc12be0e0c0eac149 (patch)
tree9471095f4a6603abd0897290b52501b548bc1c5a
parent60f0610a851e52b75ca6317584db2ab2f609f7d5 (diff)
downloadopenttd-a56661fcc17134a26bf2df5cc12be0e0c0eac149.tar.xz
(svn r10283) -Fix [FS#913]: catenary was drawn on bridges when elrail was disabled. Patch by B. N. SmatZ!.
-rw-r--r--src/elrail.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/elrail.cpp b/src/elrail.cpp
index 93cabaeb6..6faf76615 100644
--- a/src/elrail.cpp
+++ b/src/elrail.cpp
@@ -395,6 +395,8 @@ static void DrawCatenaryOnBridge(const TileInfo *ti)
void DrawCatenary(const TileInfo *ti)
{
+ if (_patches.disable_elrails) return;
+
if (MayHaveBridgeAbove(ti->tile) && IsBridgeAbove(ti->tile)) {
TileIndex head = GetNorthernBridgeEnd(ti->tile);
@@ -402,7 +404,6 @@ void DrawCatenary(const TileInfo *ti)
DrawCatenaryOnBridge(ti);
}
}
- if (_patches.disable_elrails) return;
switch (GetTileType(ti->tile)) {
case MP_RAILWAY: