diff options
author | frosch <frosch@openttd.org> | 2010-09-05 13:31:39 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2010-09-05 13:31:39 +0000 |
commit | 42a996ec23f15e74c0fe5ba0fdd5ac992456e7ac (patch) | |
tree | 201bd6edb559d4b61be8eeba31cf147a7660c189 /src/object_cmd.cpp | |
parent | ce1cae81ea55ff6bc45d4e2ed11d5c487ac6ba07 (diff) | |
download | openttd-42a996ec23f15e74c0fe5ba0fdd5ac992456e7ac.tar.xz |
(svn r20743) -Fix: Make testruns of clearing an object tile not influence repeated testruns resp. the exec run.
Diffstat (limited to 'src/object_cmd.cpp')
-rw-r--r-- | src/object_cmd.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/object_cmd.cpp b/src/object_cmd.cpp index f945a970f..291eaae9f 100644 --- a/src/object_cmd.cpp +++ b/src/object_cmd.cpp @@ -347,7 +347,7 @@ static void ReallyClearObjectTile(Object *o) delete o; } -SmallVector<TileArea, 4> _cleared_object_areas; +SmallVector<ClearedObjectArea, 4> _cleared_object_areas; static CommandCost ClearTile_Object(TileIndex tile, DoCommandFlag flags) { @@ -358,7 +358,9 @@ static CommandCost ClearTile_Object(TileIndex tile, DoCommandFlag flags) Object *o = Object::GetByTile(tile); TileArea ta = o->location; - *_cleared_object_areas.Append() = ta; + ClearedObjectArea *cleared_area = _cleared_object_areas.Append(); + cleared_area->first_tile = tile; + cleared_area->area = ta; CommandCost cost(EXPENSES_CONSTRUCTION, spec->GetClearCost() * ta.w * ta.h / 5); if (spec->flags & OBJECT_FLAG_CLEAR_INCOME) cost.MultiplyCost(-1); // They get an income! |