forked from mirror/OpenTTD
(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:
@@ -2221,12 +2221,13 @@ static void DrawTile_Station(TileInfo *ti)
|
||||
DrawTramCatenary(ti, axis == AXIS_X ? ROAD_X : ROAD_Y);
|
||||
}
|
||||
|
||||
/* End now if buildings are invisible */
|
||||
if (IsInvisibilitySet(TO_BUILDINGS)) return;
|
||||
|
||||
const DrawTileSeqStruct *dtss;
|
||||
foreach_draw_tile_seq(dtss, t->seq) {
|
||||
SpriteID image = dtss->image.sprite;
|
||||
|
||||
/* 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;
|
||||
|
||||
if (relocation == 0 || HasBit(image, SPRITE_MODIFIER_USE_OFFSET)) {
|
||||
image += total_offset;
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user