fix [effect][filter] not working correctly regarding locations

This commit is contained in:
Anonymissimus 2011-11-09 23:55:35 +00:00
parent 1f539b39c8
commit 41796894d9

View file

@ -2357,7 +2357,7 @@ void unit::add_modification(const std::string& type, const vconfig& vcfg, bool n
// Apply SUF. (Filtering on location is probably a bad idea though.)
const vconfig& afilter = veffect.child("filter");
if (!afilter.null())
if (!matches_filter(afilter, map_location(cfg_, NULL))) continue;
if (!matches_filter(afilter, loc_)) continue;
const std::string &apply_to = effect["apply_to"];
const std::string &apply_times = effect["times"];