diff options
author | rubidium <rubidium@openttd.org> | 2007-09-26 14:14:51 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2007-09-26 14:14:51 +0000 |
commit | 03191bba4bfe67c0ee86eb33e6a8a6a7b41c00bf (patch) | |
tree | ed020ef505d86ae5c922a41011dd6f0c60196148 /src | |
parent | ca5ef5477bc1a72e36f4b5f5b7b9af3f6800d933 (diff) | |
download | openttd-03191bba4bfe67c0ee86eb33e6a8a6a7b41c00bf.tar.xz |
(svn r11168) -Fix [FS#1256]: assert on terraforming of industries. Patch by frosch.
Diffstat (limited to 'src')
-rw-r--r-- | src/clear_cmd.cpp | 2 | ||||
-rw-r--r-- | src/industry_cmd.cpp | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/clear_cmd.cpp b/src/clear_cmd.cpp index 047f003c3..77f42552b 100644 --- a/src/clear_cmd.cpp +++ b/src/clear_cmd.cpp @@ -314,7 +314,7 @@ CommandCost CmdTerraformLand(TileIndex tile, uint32 flags, uint32 p1, uint32 p2) return_cmd_error(STR_1002_EXCAVATION_WOULD_DAMAGE); } /* Check tiletype-specific things, and add extra-cost */ - CommandCost cost = _tile_type_procs[GetTileType(tile)]->terraform_tile_proc(tile, flags, z_min * TILE_HEIGHT, (Slope) tileh); + CommandCost cost = _tile_type_procs[GetTileType(tile)]->terraform_tile_proc(tile, flags | DC_AUTO, z_min * TILE_HEIGHT, (Slope) tileh); if (CmdFailed(cost)) { _terraform_err_tile = tile; return cost; diff --git a/src/industry_cmd.cpp b/src/industry_cmd.cpp index dd62073eb..44eb9ed99 100644 --- a/src/industry_cmd.cpp +++ b/src/industry_cmd.cpp @@ -385,6 +385,7 @@ static CommandCost ClearTile_Industry(TileIndex tile, byte flags) */ if ((_current_player != OWNER_WATER && _game_mode != GM_EDITOR && !_cheats.magic_bulldozer.value) || + ((flags & DC_AUTO) != 0) || (_current_player == OWNER_WATER && (indspec->behaviour & INDUSTRYBEH_BUILT_ONWATER))) { SetDParam(0, indspec->name); return_cmd_error(STR_4800_IN_THE_WAY); @@ -2019,7 +2020,7 @@ static CommandCost TerraformTile_Industry(TileIndex tile, uint32 flags, uint z_n } } } - return DoCommand(tile, 0, 0, flags, CMD_LANDSCAPE_CLEAR); // funny magic bulldozer + return DoCommand(tile, 0, 0, flags, CMD_LANDSCAPE_CLEAR); } extern const TileTypeProcs _tile_type_industry_procs = { |