Erased target location before moving a unit. (Fix for bug #16391.)
This commit is contained in:
parent
1179fbbca3
commit
d41e8cfeec
1 changed files with 2 additions and 1 deletions
|
@ -1847,7 +1847,8 @@ static int intf_put_unit(lua_State *L)
|
|||
u = lu->get();
|
||||
if (!u) return luaL_argerror(L, unit_arg, "unit not found");
|
||||
if (lu->on_map()) {
|
||||
if (unit_arg == 1) return 0;
|
||||
if (unit_arg == 1 || u->get_location() == loc) return 0;
|
||||
resources::units->erase(loc);
|
||||
resources::units->move(u->get_location(), loc);
|
||||
return 0;
|
||||
} else if (int side = lu->on_recall_list()) {
|
||||
|
|
Loading…
Add table
Reference in a new issue