Changeset - r16526:225fd831e236
[Not reviewed]
master
0 1 0
frosch - 14 years ago 2010-11-20 00:24:50
frosch@openttd.org
(svn r21262) -Fix (r18708)[FS#4246]: Custom station foundations using the 'simple foundations'-method did not draw any sprite for WSE-slopes when there are foundations on both neighboured tiles in the north. As there must be at least one sprite to provide the correct offset for the groundsprite draw the (empty) default foundation sprite in that case.
1 file changed with 8 insertions and 0 deletions:
0 comments (0 inline, 0 general)
src/station_cmd.cpp
Show inline comments
 
@@ -2649,6 +2649,13 @@ static void DrawTile_Station(TileInfo *t
 
				if (!HasFoundationNW(ti->tile, slope, z)) ClrBit(parts, 6);
 
				if (!HasFoundationNE(ti->tile, slope, z)) ClrBit(parts, 7);
 

	
 
				if (parts == 0) {
 
					/* We always have to draw at least one sprite to make sure there is a boundingbox and a sprite with the
 
					 * correct offset for the childsprites.
 
					 * So, draw the (completely empty) sprite of the default foundations. */
 
					goto draw_default_foundation;
 
				}
 

	
 
				StartSpriteCombine();
 
				for (int i = 0; i < 8; i++) {
 
					if (HasBit(parts, i)) {
 
@@ -2661,6 +2668,7 @@ static void DrawTile_Station(TileInfo *t
 
			OffsetGroundSprite(31, 1);
 
			ti->z += ApplyFoundationToSlope(FOUNDATION_LEVELED, &ti->tileh);
 
		} else {
 
draw_default_foundation:
 
			DrawFoundation(ti, FOUNDATION_LEVELED);
 
		}
 
	}
0 comments (0 inline, 0 general)