Changeset - r18998:8e6e575c042a
[Not reviewed]
master
0 1 0
frosch - 12 years ago 2012-01-28 18:11:18
frosch@openttd.org
(svn r23864) -Fix: Railtype overlays were drawn 'only transparent' on invisible bridges.
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/tunnelbridge_cmd.cpp
Show inline comments
 
@@ -1389,25 +1389,25 @@ void DrawBridgeMiddle(const TileInfo *ti
 
	if (transport_type == TRANSPORT_ROAD) {
 
		RoadTypes rts = GetRoadTypes(rampsouth);
 

	
 
		if (HasBit(rts, ROADTYPE_TRAM)) {
 
			/* DrawBridgeTramBits() calls EndSpriteCombine() and StartSpriteCombine() */
 
			DrawBridgeTramBits(x, y, bridge_z, axis ^ 1, HasBit(rts, ROADTYPE_ROAD), false);
 
		} else {
 
			EndSpriteCombine();
 
			StartSpriteCombine();
 
		}
 
	} else if (transport_type == TRANSPORT_RAIL) {
 
		const RailtypeInfo *rti = GetRailTypeInfo(GetRailType(rampsouth));
 
		if (rti->UsesOverlay()) {
 
		if (rti->UsesOverlay() && !IsInvisibilitySet(TO_BRIDGES)) {
 
			SpriteID surface = GetCustomRailSprite(rti, rampsouth, RTSG_BRIDGE, TCX_ON_BRIDGE);
 
			if (surface != 0) {
 
				AddSortableSpriteToDraw(surface + axis, PAL_NONE, x, y, 16, 16, 0, bridge_z, IsTransparencySet(TO_BRIDGES));
 
			}
 
		}
 
		EndSpriteCombine();
 

	
 
		if (HasCatenaryDrawn(GetRailType(rampsouth))) {
 
			DrawCatenaryOnBridge(ti);
 
		}
 
	}
 

	
0 comments (0 inline, 0 general)