diff options
author | smatz <smatz@openttd.org> | 2008-06-18 16:48:58 +0000 |
---|---|---|
committer | smatz <smatz@openttd.org> | 2008-06-18 16:48:58 +0000 |
commit | 811ae0ac3f16a0a093d8ab66e73074847299a344 (patch) | |
tree | 74ebc46ae805dadccfc1057266b9f5f85873da3f /src/rail_cmd.cpp | |
parent | 883ffd168323c34fcc746e292817831ba3e9efc1 (diff) | |
download | openttd-811ae0ac3f16a0a093d8ab66e73074847299a344.tar.xz |
(svn r13565) -Change [FS#2077]: when invisibility is set, sprite sequences are now drawn until first non-opaque sprite is found (bit 14 not set)
This is to balance performance, code complexity and NewGRF requirements
Diffstat (limited to 'src/rail_cmd.cpp')
-rw-r--r-- | src/rail_cmd.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/rail_cmd.cpp b/src/rail_cmd.cpp index 7325c8c96..af1fa1cc5 100644 --- a/src/rail_cmd.cpp +++ b/src/rail_cmd.cpp @@ -1847,13 +1847,13 @@ default_waypoint: if (HasCatenaryDrawn(GetRailType(ti->tile))) DrawCatenary(ti); - /* End now if buildings are invisible */ - if (IsInvisibilitySet(TO_BUILDINGS)) return; - foreach_draw_tile_seq(dtss, dts->seq) { SpriteID image = dtss->image.sprite; SpriteID pal; + /* Stop drawing sprite sequence once we meet a sprite that doesn't have to be opaque */ + if (IsInvisibilitySet(TO_BUILDINGS) && !HasBit(image, SPRITE_MODIFIER_OPAQUE)) return; + /* Unlike stations, our default waypoint has no variation for * different railtype, so don't use the railtype offset if * no relocation is set */ |