mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-21 14:34:53 +00:00
Prevented [facing] filters from returning the own unit.
(Fix for bug #16397.)
This commit is contained in:
parent
8c5447a121
commit
046e8b57d3
@ -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…
x
Reference in New Issue
Block a user