forked from mirror/OpenTTD
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.
This commit is contained in:
@@ -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;
|
if (IsTileType(current_tile, MP_WATER) && (!IsTileOwner(current_tile, OWNER_WATER) || wc == WATER_CLASS_SEA)) continue;
|
||||||
|
|
||||||
bool water = IsWaterTile(current_tile);
|
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 (ret.Failed()) return ret;
|
||||||
|
|
||||||
if (!water) cost.AddCost(ret);
|
if (!water) cost.AddCost(ret);
|
||||||
|
Reference in New Issue
Block a user