[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.
This commit is contained in:
parent
9f43c4a10e
commit
e63bd35f9d
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