summaryrefslogtreecommitdiff
path: root/src/object_cmd.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/object_cmd.cpp')
-rw-r--r--src/object_cmd.cpp6
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!