summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortron <tron@openttd.org>2005-01-20 18:19:37 +0000
committertron <tron@openttd.org>2005-01-20 18:19:37 +0000
commit2e0d576e6b5e8b286d5373724b0af738fec27fdc (patch)
tree9dd585b74b5389f3e43c04eae064141544de0fd9
parent44dae05c3dcff25eb7fb037d396dee6aec64c149 (diff)
downloadopenttd-2e0d576e6b5e8b286d5373724b0af738fec27fdc.tar.xz
(svn r1577) Fix: [1103301] Railroad tracks on slopes weren't flooded
-rw-r--r--water_cmd.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/water_cmd.c b/water_cmd.c
index de58831c6..289767c0d 100644
--- a/water_cmd.c
+++ b/water_cmd.c
@@ -502,6 +502,18 @@ static void TileLoopWaterHelper(TileIndex tile, const TileIndexDiffC *offs)
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;