tunnelbridge_cmd.c
changeset 1091 0f113f2ed794
parent 1082 a83d7ac6fecb
child 1095 b59632d9df1b
--- a/tunnelbridge_cmd.c	Sat Jan 22 18:59:53 2005 +0000
+++ b/tunnelbridge_cmd.c	Sat Jan 22 19:05:30 2005 +0000
@@ -310,7 +310,7 @@
 		}
 
 		if (ti.type == MP_WATER) {
-			if (ti.map5 != 0) goto not_valid_below;
+			if (ti.map5 > 1) goto not_valid_below;
 			m5 = 0xC8;
 		} else if (ti.type == MP_RAILWAY) {
 			if (direction == 0) {
@@ -780,7 +780,7 @@
 					new_data = _new_data_table[((m5 & 0x18) >> 2) | (m5&1)];
 				}	else {
 					if (!(m5 & 0x18)) goto clear_it;
-					new_data = 0x6000;
+					new_data = (GetTileSlope(c, NULL) == 0) ? 0x6000 : 0x6001;
 				}
 
 				SetTileType(c, new_data >> 12);
@@ -937,6 +937,7 @@
 
 #include "table/bridge_land.h"
 #include "table/tunnel_land.h"
+#include "table/water_land.h"
 
 static void DrawBridgePillars(TileInfo *ti, int x, int y, int z)
 {
@@ -1075,7 +1076,11 @@
 			if (!(ti->map5 & 0x20)) {
 				// draw land under bridge
 				if (ice) image += 2;					// ice too?
-				DrawGroundSprite(_bridge_land_below[image] + _tileh_to_sprite[ti->tileh]);
+
+				if (image != 1 || ti->tileh == 0)
+					DrawGroundSprite(_bridge_land_below[image] + _tileh_to_sprite[ti->tileh]);
+				else
+					DrawGroundSprite(_water_shore_sprites[ti->tileh]);
 
 				// draw canal water?
 				if (ti->map5 & 8 && ti->z != 0) DrawCanalWater(ti->tile);