Fix [heal_unit] attempting to animate even if filter didn't match a unit

This commit is contained in:
Celtic Minstrel 2017-03-26 00:15:38 -04:00 committed by GitHub
parent a9ba9a9fea
commit 701649a75e

View file

@ -688,7 +688,7 @@ function wml_actions.heal_unit(cfg)
end
if cfg.animate then
if #healers then
if #healers > 0 then
local animator = wesnoth.create_animator()
-- Need dummy 3rd argument here...
animator:add(healers[1], 'healing', 'hits')