(svn r20748) -Fix: overbuilding an object tile with sea under it with a canal didn't take the cost for clearing the sea into account

This commit is contained in:
yexo
2010-09-05 16:00:36 +00:00
parent 323c526a4d
commit 0e250f2bdf
5 changed files with 15 additions and 6 deletions

View File

@@ -318,7 +318,7 @@ CommandCost CmdTerraformLand(TileIndex tile, DoCommandFlag flags, uint32 p1, uin
/* Check tiletype-specific things, and add extra-cost */
const bool curr_gen = _generating_world;
if (_game_mode == GM_EDITOR) _generating_world = true; // used to create green terraformed land
CommandCost cost = _tile_type_procs[GetTileType(tile)]->terraform_tile_proc(tile, flags | DC_AUTO, z_min * TILE_HEIGHT, tileh);
CommandCost cost = _tile_type_procs[GetTileType(tile)]->terraform_tile_proc(tile, flags | DC_AUTO | DC_FORCE_CLEAR_TILE, z_min * TILE_HEIGHT, tileh);
_generating_world = curr_gen;
if (cost.Failed()) {
_terraform_err_tile = tile;