diff options
| author | Petr Mrázek | 2011-10-28 04:52:20 +0200 |
|---|---|---|
| committer | Petr Mrázek | 2011-10-28 04:52:20 +0200 |
| commit | 4d6e93988acad4342da504e9e4d775f1d6d2496d (patch) | |
| tree | 2fc9afab11d1bc0bfed4d7fe7d6a5a14e96f7cd3 /plugins/cleaners.cpp | |
| parent | bfc8df30056e13c3132aa2b302bce79a3c07e963 (diff) | |
| download | dfhack-4d6e93988acad4342da504e9e4d775f1d6d2496d.tar.gz dfhack-4d6e93988acad4342da504e9e4d775f1d6d2496d.tar.bz2 dfhack-4d6e93988acad4342da504e9e4d775f1d6d2496d.tar.xz | |
Delete spatter objects while cleaning items and creatures.
Diffstat (limited to 'plugins/cleaners.cpp')
| -rw-r--r-- | plugins/cleaners.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/plugins/cleaners.cpp b/plugins/cleaners.cpp index 47bd0088..638ca7af 100644 --- a/plugins/cleaners.cpp +++ b/plugins/cleaners.cpp @@ -113,6 +113,8 @@ command_result cleanitems (Core * c) continue; if (itm->contaminants->size()) { + for(int j = 0; j < itm->contaminants->size(); j++) + delete itm->contaminants->at(j); cleaned_items++; cleaned_total += itm->contaminants->size(); itm->contaminants->clear(); @@ -141,6 +143,8 @@ command_result cleanunits (Core * c) int num = unit->contaminants.size(); if (num) { + for(int j = 0; j < unit->contaminants.size(); j++) + delete unit->contaminants.at(j); cleaned_units++; cleaned_total += num; unit->contaminants.clear(); |
