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.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/object_cmd.cpp b/src/object_cmd.cpp
index 22abaeec5..2a5c229f6 100644
--- a/src/object_cmd.cpp
+++ b/src/object_cmd.cpp
@@ -342,6 +342,8 @@ static void ReallyClearObjectTile(Object *o)
delete o;
}
+SmallVector<TileArea, 4> _cleared_object_areas;
+
static CommandCost ClearTile_Object(TileIndex tile, DoCommandFlag flags)
{
ObjectType type = GetObjectType(tile);
@@ -351,6 +353,8 @@ static CommandCost ClearTile_Object(TileIndex tile, DoCommandFlag flags)
Object *o = Object::GetByTile(tile);
TileArea ta = o->location;
+ *_cleared_object_areas.Append() = 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!