summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorplanetmaker <planetmaker@openttd.org>2013-01-20 13:50:10 +0000
committerplanetmaker <planetmaker@openttd.org>2013-01-20 13:50:10 +0000
commit9823fac63b8dde1ca0d90e2ec9a639e14a363429 (patch)
tree51da3e28012ea4ea7e7ecffdd443e6bc375e20f5
parent42883b9543fcb92acc6d3360cfb89f4ac79d2cef (diff)
downloadopenttd-9823fac63b8dde1ca0d90e2ec9a639e14a363429.tar.xz
(svn r24924) -Fix (r24923): Make sure that autoslope on steep coast tiles cannot not leave invalid canals
-rw-r--r--src/water_cmd.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/water_cmd.cpp b/src/water_cmd.cpp
index ae5efada7..9d099f5dc 100644
--- a/src/water_cmd.cpp
+++ b/src/water_cmd.cpp
@@ -175,8 +175,8 @@ void MakeWaterKeepingClass(TileIndex tile, Owner o)
wc = WATER_CLASS_INVALID;
}
- /* There must not be water sloped invalidly, whatever class it may be */
- if (GetInclinedSlopeDirection(slope) == INVALID_DIAGDIR) {
+ /* Only river water should be restored on appropriate slopes. Other water would be invalid on slopes */
+ if (wc != WATER_CLASS_RIVER || GetInclinedSlopeDirection(slope) == INVALID_DIAGDIR) {
wc = WATER_CLASS_INVALID;
}
}