Prevented [facing] filters from returning the own unit.
(Fix for bug #16397.)
This commit is contained in:
parent
8c5447a121
commit
046e8b57d3
1 changed files with 1 additions and 1 deletions
|
@ -566,7 +566,7 @@ void wml_animation_internal(unit_animator &animator, const vconfig &cfg, const m
|
|||
terrain_filter filter(t_filter, *resources::units);
|
||||
std::set<map_location> locs;
|
||||
filter.get_locations(locs);
|
||||
if(!locs.empty()) {
|
||||
if (!locs.empty() && u->get_location() != *locs.begin()) {
|
||||
map_location::DIRECTION dir =u->get_location().get_relative_dir(*locs.begin());
|
||||
u->set_facing(dir);
|
||||
secondary_loc = u->get_location().get_direction(dir);
|
||||
|
|
Loading…
Add table
Reference in a new issue