Make [remove_shroud] and [place_shroud] use real SLFs,

...not just (x,y) lists/ranges.
This commit is contained in:
Ignacio R. Morelle 2009-01-17 03:12:12 +00:00
parent 5ad98b06f0
commit 1c8c7a12d4
2 changed files with 8 additions and 2 deletions

View file

@ -49,6 +49,8 @@ Version 1.5.7+svn:
with a SLF
* add a [replace_map] map="file" event that can load a map of a different
size in a scenario
* make [remove_shroud] and [place_shroud] use true Standard Location Filters,
not just location lists/ranges.
* Miscellaneous and bug fixes:
* Added the sunset feature to the new dialogs.
* Fix the calculate feature in the test scenario.

View file

@ -496,8 +496,12 @@ namespace {
const size_t index = side_num-1;
if(index < teams->size()) {
const std::vector<map_location>& locs = multiple_locs(cfg);
for(std::vector<map_location>::const_iterator j = locs.begin(); j != locs.end(); ++j) {
std::set<map_location> locs;
terrain_filter filter(cfg, *game_map, *status_ptr, *units);
filter.restrict_size(game_config::max_loop);
filter.get_locations(locs);
for(std::set<map_location>::const_iterator j = locs.begin(); j != locs.end(); ++j) {
if(remove) {
(*teams)[index].clear_shroud(*j);
} else {