summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuXarick <43006711+SamuXarick@users.noreply.github.com>2021-09-18 11:44:06 +0100
committerPatric Stout <github@truebrain.nl>2021-09-18 13:24:49 +0200
commit6ce74b2a1b7fac7d3052a98175216a7ee0ef8250 (patch)
treeebd48a15cacf0fa8ceafa578bf0a7dbfcd716e6d
parent20717ededfe6cc370f9c35cff5b8d732105975f7 (diff)
downloadopenttd-6ce74b2a1b7fac7d3052a98175216a7ee0ef8250.tar.xz
Fix: reduce cost of building canals over objects on sea
It is not like we will drain the sea first, to put water back in it after. Besides, the cost for draining the sea isn't calculated for all other cases either.
-rw-r--r--src/water_cmd.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/water_cmd.cpp b/src/water_cmd.cpp
index a2bedac84..6906f744b 100644
--- a/src/water_cmd.cpp
+++ b/src/water_cmd.cpp
@@ -479,7 +479,7 @@ CommandCost CmdBuildCanal(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32
if (IsTileType(current_tile, MP_WATER) && (!IsTileOwner(current_tile, OWNER_WATER) || wc == WATER_CLASS_SEA)) continue;
bool water = IsWaterTile(current_tile);
- ret = DoCommand(current_tile, 0, 0, flags | DC_FORCE_CLEAR_TILE, CMD_LANDSCAPE_CLEAR);
+ ret = DoCommand(current_tile, 0, 0, flags, CMD_LANDSCAPE_CLEAR);
if (ret.Failed()) return ret;
if (!water) cost.AddCost(ret);