introduced [allied_with]<SSF> in SSFs
Due to the previous revision, [not][enemy_of] is no longer the same as [allied_with].
This commit is contained in:
parent
b20cd08dc9
commit
e1d41b4e50
1 changed files with 11 additions and 0 deletions
|
@ -158,6 +158,17 @@ bool side_filter::match_internal(const team &t) const
|
|||
}
|
||||
}
|
||||
|
||||
const vconfig& allied_with = cfg_.child("allied_with");
|
||||
if(!allied_with.null()) {
|
||||
side_filter s_filter(allied_with);
|
||||
const std::set<int>& teams = s_filter.get_teams();
|
||||
if(teams.empty()) return false;
|
||||
foreach(const int side, teams) {
|
||||
if((*resources::teams)[side - 1].is_enemy(t.side()))
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue