[animate_unit]: clear the animation after playing it
This avoids a reference to the unit from being leaked, which prevented the
unit's halo (if any) from disappearing when the unit died.
Fixes #3509. Closes #3520.
(cherry-picked from commit e63bd35f9d
)
This commit is contained in:
parent
d8b26a92fb
commit
ee3e842cbc
1 changed files with 1 additions and 0 deletions
|
@ -110,4 +110,5 @@ function wesnoth.wml_actions.animate_unit(cfg)
|
|||
local anim = wesnoth.create_animator()
|
||||
add_animation(anim, cfg)
|
||||
anim:run()
|
||||
anim:clear()
|
||||
end
|
Loading…
Add table
Reference in a new issue