diff options
author | smatz <smatz@openttd.org> | 2008-04-03 19:55:40 +0000 |
---|---|---|
committer | smatz <smatz@openttd.org> | 2008-04-03 19:55:40 +0000 |
commit | febc5150c9ee3f2df2a1cad8ef527d9541697b22 (patch) | |
tree | 6e5ae7f6b1b5f40dbc7a0e75f50db327a96a8b37 /src/road_cmd.cpp | |
parent | 83f9e141e038d1564ca2ed9d2ff034afbc948dbc (diff) | |
download | openttd-febc5150c9ee3f2df2a1cad8ef527d9541697b22.tar.xz |
(svn r12547) -Feature: invisibility options to make objects invisible instead of transparent
Diffstat (limited to 'src/road_cmd.cpp')
-rw-r--r-- | src/road_cmd.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/road_cmd.cpp b/src/road_cmd.cpp index 7906650ab..29168db7f 100644 --- a/src/road_cmd.cpp +++ b/src/road_cmd.cpp @@ -970,6 +970,9 @@ static bool AlwaysDrawUnpavedRoads(TileIndex tile, Roadside roadside) */ void DrawTramCatenary(TileInfo *ti, RoadBits tram) { + /* Do not draw catenary if it is invisible */ + if (IsInvisibilitySet(TO_CATENARY)) return; + /* Don't draw the catenary under a low bridge */ if (MayHaveBridgeAbove(ti->tile) && IsBridgeAbove(ti->tile) && !IsTransparencySet(TO_CATENARY)) { uint height = GetBridgeHeight(GetNorthernBridgeEnd(ti->tile)); @@ -1154,6 +1157,9 @@ static void DrawTile_Road(TileInfo *ti) DrawGroundSprite(dts->ground.sprite, PAL_NONE); + /* End now if buildings are invisible */ + if (IsInvisibilitySet(TO_BUILDINGS)) break; + for (dtss = dts->seq; dtss->image.sprite != 0; dtss++) { SpriteID image = dtss->image.sprite; SpriteID pal; |