summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/object_cmd.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/object_cmd.cpp b/src/object_cmd.cpp
index 17a053b3d..c81b212b7 100644
--- a/src/object_cmd.cpp
+++ b/src/object_cmd.cpp
@@ -425,10 +425,6 @@ static CommandCost ClearTile_Object(TileIndex tile, DoCommandFlag flags)
Object *o = Object::GetByTile(tile);
TileArea ta = o->location;
- 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!
@@ -486,6 +482,10 @@ static CommandCost ClearTile_Object(TileIndex tile, DoCommandFlag flags)
break;
}
+ ClearedObjectArea *cleared_area = _cleared_object_areas.Append();
+ cleared_area->first_tile = tile;
+ cleared_area->area = ta;
+
if (flags & DC_EXEC) ReallyClearObjectTile(o);
return cost;