(svn r20743) -Fix: Make testruns of clearing an object tile not influence repeated testruns resp. the exec run.

This commit is contained in:
frosch
2010-09-05 13:31:39 +00:00
parent ce1cae81ea
commit 42a996ec23
4 changed files with 31 additions and 8 deletions

View File

@@ -1695,7 +1695,7 @@ static CommandCost CreateNewIndustryHelper(TileIndex tile, IndustryType type, Do
*ip = NULL;
SmallVector<TileArea, 1> object_areas(_cleared_object_areas);
SmallVector<ClearedObjectArea, 1> object_areas(_cleared_object_areas);
CommandCost ret = CheckIfIndustryTilesAreFree(tile, it, itspec_index, type, random_initial_bits, founder, &custom_shape_check);
_cleared_object_areas = object_areas;
if (ret.Failed()) return ret;
@@ -1797,7 +1797,7 @@ CommandCost CmdBuildIndustry(TileIndex tile, DoCommandFlag flags, uint32 p1, uin
if (num >= count) return CMD_ERROR;
CommandCost ret = CommandCost(STR_ERROR_SITE_UNSUITABLE);
SmallVector<TileArea, 1> object_areas(_cleared_object_areas);
SmallVector<ClearedObjectArea, 1> object_areas(_cleared_object_areas);
do {
if (--count < 0) return ret;
if (--num < 0) num = indspec->num_table - 1;