Skip to content

Commit

Permalink
Fix: halo (if any) remains when wesnoth.put_recall_unit() is used
Browse files Browse the repository at this point in the history
Based on the suggested fix in #3425. Closes #3425.

(cherry-picked from commit 46bec21)
  • Loading branch information
jyrkive committed Oct 7, 2018
1 parent d37c6d6 commit 87c87ae
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/scripting/game_lua_kernel.cpp
Expand Up @@ -2213,8 +2213,11 @@ int game_lua_kernel::intf_put_recall_unit(lua_State *L)
t.recall_list().erase_by_underlying_id(uid);
t.recall_list().add(u);
if (lu) {
if (lu->on_map())
if (lu->on_map()) {
units().erase(u->get_location());
resources::whiteboard->on_kill_unit();
u->anim_comp().clear_haloes();
}
lu->lua_unit::~lua_unit();
new(lu) lua_unit(side, uid);
}
Expand Down

0 comments on commit 87c87ae

Please sign in to comment.