diff options
author | smatz <smatz@openttd.org> | 2008-05-08 16:48:29 +0000 |
---|---|---|
committer | smatz <smatz@openttd.org> | 2008-05-08 16:48:29 +0000 |
commit | 386a3f1d208a67af646da9a0bedba375858f822c (patch) | |
tree | 4102a7e524984bc47f14e70bc388938ea0c957c7 /src/elrail.cpp | |
parent | 4a11ebe76fcaba45954aa2b6f29e6e75a8c30942 (diff) | |
download | openttd-386a3f1d208a67af646da9a0bedba375858f822c.tar.xz |
(svn r13016) -Codechange: unify the detection if rail catenary should be drawn
Diffstat (limited to 'src/elrail.cpp')
-rw-r--r-- | src/elrail.cpp | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/src/elrail.cpp b/src/elrail.cpp index 1db2471a7..81ddb3dea 100644 --- a/src/elrail.cpp +++ b/src/elrail.cpp @@ -67,6 +67,7 @@ #include "player_base.h" #include "tunnelbridge.h" #include "engine_func.h" +#include "elrail_func.h" #include "engine_base.h" #include "table/sprites.h" @@ -182,8 +183,6 @@ void DrawCatenaryOnTunnel(const TileInfo *ti) { 1, 0, 15, 16 }, // NW }; - if (!HasCatenary(GetRailType(ti->tile)) || _patches.disable_elrails) return; - DiagDirection dir = GetTunnelBridgeDirection(ti->tile); const SortableSpriteStruct *sss = &CatenarySpriteData_Tunnel[dir]; @@ -382,11 +381,6 @@ static void DrawCatenaryRailway(const TileInfo *ti) void DrawCatenaryOnBridge(const TileInfo *ti) { - if (_patches.disable_elrails) return; - - /* Do not draw catenary if it is invisible */ - if (IsInvisibilitySet(TO_CATENARY)) return; - TileIndex end = GetSouthernBridgeEnd(ti->tile); TileIndex start = GetOtherBridgeEnd(end); @@ -440,11 +434,6 @@ void DrawCatenaryOnBridge(const TileInfo *ti) void DrawCatenary(const TileInfo *ti) { - if (_patches.disable_elrails) return; - - /* Do not draw catenary if it is invisible */ - if (IsInvisibilitySet(TO_CATENARY)) return; - switch (GetTileType(ti->tile)) { case MP_RAILWAY: if (IsRailDepot(ti->tile)) { |