(svn r1577) Fix: [1103301] Railroad tracks on slopes weren't flooded
authortron
Thu, 20 Jan 2005 18:19:37 +0000
changeset 1076 ee035f4a90e9
parent 1075 ac99a44bd399
child 1077 3a38f07dddcc
(svn r1577) Fix: [1103301] Railroad tracks on slopes weren't flooded
water_cmd.c
--- a/water_cmd.c	Thu Jan 20 18:18:32 2005 +0000
+++ b/water_cmd.c	Thu Jan 20 18:19:37 2005 +0000
@@ -502,6 +502,18 @@
 			TileHeight(TILE_ADD(tile, ToTileIndexDiff(offs[4]))) != 0) {
 		// make coast..
 		switch (TileType(target)) {
+			case MP_RAILWAY: {
+				uint slope = GetTileSlope(target, NULL);
+				byte tracks = _map5[target] & 0x3F;
+				if (!(
+						(slope == 1 && tracks == 0x20) ||
+						(slope == 2 && tracks == 0x04) ||
+						(slope == 4 && tracks == 0x10) ||
+						(slope == 8 && tracks == 0x08)))
+					break;
+			}
+			/* FALLTHROUGH */
+
 			case MP_CLEAR:
 			case MP_TREES:
 				_current_player = OWNER_WATER;