Skip to content

Commit

Permalink
Some fixes to [heal_unit]animate=yes
Browse files Browse the repository at this point in the history
- Play the healed animation
- Pass the heal amount to both animations
  • Loading branch information
CelticMinstrel committed Mar 27, 2017
1 parent 2417cf3 commit 0c4b05e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions data/lua/wml-tags.lua
Expand Up @@ -688,12 +688,12 @@ function wml_actions.heal_unit(cfg)
end

if cfg.animate then
local animator = wesnoth.create_animator()
animator:add(u, 'healed', 'hits', {value = heal_amount})
if #healers > 0 then
local animator = wesnoth.create_animator()
-- Need dummy 3rd argument here...
animator:add(healers[1], 'healing', 'hits')
animator:run()
animator:add(healers[1], 'healing', 'hits', {value = heal_amount})
end
animator:run()
end
end
end
Expand Down

0 comments on commit 0c4b05e

Please sign in to comment.