Changeset - r17907:56fdc184ce8b
[Not reviewed]
master
0 1 0
frosch - 13 years ago 2011-08-06 11:14:07
frosch@openttd.org
(svn r22722) -Fix: Skip invisible parent and child sprites due to transparency settings using the same logic as skipping due to grf-defined invisibility.
1 file changed with 2 insertions and 4 deletions:
0 comments (0 inline, 0 general)
src/sprite.cpp
Show inline comments
 
@@ -43,14 +43,12 @@ void DrawCommonTileSeq(const TileInfo *t
 
		}
 

	
 
		/* TTD sprite 0 means no sprite */
 
		if (GB(image, 0, SPRITE_WIDTH) == 0 && !HasBit(image, SPRITE_MODIFIER_CUSTOM_SPRITE)) {
 
		if ((GB(image, 0, SPRITE_WIDTH) == 0 && !HasBit(image, SPRITE_MODIFIER_CUSTOM_SPRITE)) ||
 
				(IsInvisibilitySet(to) && !HasBit(image, SPRITE_MODIFIER_OPAQUE))) {
 
			skip_childs = dtss->IsParentSprite();
 
			continue;
 
		}
 

	
 
		/* Stop drawing sprite sequence once we meet a sprite that doesn't have to be opaque */
 
		if (IsInvisibilitySet(to) && !HasBit(image, SPRITE_MODIFIER_OPAQUE)) return;
 

	
 
		image += (HasBit(image, SPRITE_MODIFIER_CUSTOM_SPRITE) ? newgrf_offset : orig_offset);
 
		if (HasBit(pal, SPRITE_MODIFIER_CUSTOM_SPRITE)) pal += newgrf_offset;
 

	
0 comments (0 inline, 0 general)