(svn r500) -Fix: Some bridge part isn't displayed transparent in transparent mode
authortron
Wed, 03 Nov 2004 11:06:21 +0000
changeset 333 be1ecd3b8f7c
parent 332 2e853c8bb691
child 334 7e87a24e88b5
(svn r500) -Fix: Some bridge part isn't displayed transparent in transparent mode
-Fix: If bridge has no pillars cursor arrow is displayed in transparent mode
tunnelbridge_cmd.c
--- a/tunnelbridge_cmd.c	Mon Nov 01 15:08:40 2004 +0000
+++ b/tunnelbridge_cmd.c	Wed Nov 03 11:06:21 2004 +0000
@@ -934,11 +934,12 @@
 	// (necessary for cantilever bridges)
 	image = b[12 + (ti->map5&0x01)];
 	piece = _map2[ti->tile]&0xF;
-	if( image!=0 && piece!=0 )
-		DrawGroundSpriteAt(image, x,y, z);
+	if (image != 0 && piece != 0) {
+		if (!(_display_opt & DO_TRANS_BUILDINGS)) image = (image & 0x3FFF) | 0x03224000;
+		DrawGroundSpriteAt(image, x, y, z);
+	}
 
 	image = b[(ti->map5&0x01)*6 + piece];
-	if (!(_display_opt & DO_TRANS_BUILDINGS)) image = (image & 0x3FFF) | 0x03224000;
 
 	if (image != 0) {
 		int back_height, front_height, i=z;
@@ -951,6 +952,8 @@
 			{2,4,8,1,  11,16,9,0},
 		};
 
+		if (!(_display_opt & DO_TRANS_BUILDINGS)) image = (image & 0x3FFF) | 0x03224000;
+
 		p = _tileh_bits[(image & 1) * 2 + (ti->map5&0x01)];
 		front_height = ti->z + ((ti->tileh & p[0])?8:0);
 		back_height = ti->z + ((ti->tileh & p[1])?8:0);