diff options
author | planetmaker <planetmaker@openttd.org> | 2014-02-16 17:03:58 +0000 |
---|---|---|
committer | planetmaker <planetmaker@openttd.org> | 2014-02-16 17:03:58 +0000 |
commit | 40f61eaf15b17a5f56d12734f1ae421eff4a23ed (patch) | |
tree | b9f2c168fbcf5500505dfa9ef33257b28270dfb8 /src/water_cmd.cpp | |
parent | 46590e112e6c8f11ccdc22cdd5055151c9b03e09 (diff) | |
download | openttd-40f61eaf15b17a5f56d12734f1ae421eff4a23ed.tar.xz |
(svn r26344) -Change [FS#5907]: Do not flood shores of type MP_TREE needlessly (MJP)
Diffstat (limited to 'src/water_cmd.cpp')
-rw-r--r-- | src/water_cmd.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/water_cmd.cpp b/src/water_cmd.cpp index 263731937..15c57afd5 100644 --- a/src/water_cmd.cpp +++ b/src/water_cmd.cpp @@ -1165,6 +1165,9 @@ void TileLoop_Water(TileIndex tile) /* do not try to flood water tiles - increases performance a lot */ if (IsTileType(dest, MP_WATER)) continue; + /* TREE_GROUND_SHORE is the sign of a previous flood. */ + if (IsTileType(dest, MP_TREES) && GetTreeGround(dest) == TREE_GROUND_SHORE) continue; + int z_dest; Slope slope_dest = GetFoundationSlope(dest, &z_dest) & ~SLOPE_HALFTILE_MASK & ~SLOPE_STEEP; if (z_dest > 0) continue; |