(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
This commit is contained in:
smatz
2008-06-18 16:48:58 +00:00
parent cc2f9187cc
commit 29985b768c
4 changed files with 13 additions and 12 deletions

View File

@@ -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 */