From 0f44dfe473ab895b9539ac8b36f9ccf1b2e656c9 Mon Sep 17 00:00:00 2001 From: planetmaker Date: Sun, 16 Feb 2014 17:03:58 +0000 Subject: [PATCH] (svn r26344) -Change [FS#5907]: Do not flood shores of type MP_TREE needlessly (MJP) --- src/water_cmd.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/water_cmd.cpp b/src/water_cmd.cpp index 263731937e..15c57afd56 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;