Skip to content

Commit

Permalink
Fixed unstore_unit lua code (issue #5519)
Browse files Browse the repository at this point in the history
x,y were both binding to whole table instead of their expected values
  • Loading branch information
MrTitainin committed Feb 6, 2021
1 parent fb07c24 commit add999b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion data/lua/wml-tags.lua
Expand Up @@ -839,7 +839,8 @@ wml_actions.unstore_unit = function(cfg)
local x = cfg.x or unit.x or -1
local y = cfg.y or unit.y or -1
if cfg.location_id then
x, y = wesnoth.special_locations[cfg.location_id]
local loc = wesnoth.special_locations[cfg.location_id]
x,y = loc[1], loc[2]
end
wesnoth.add_known_unit(unit.type)
if on_board(x, y) then
Expand Down

0 comments on commit add999b

Please sign in to comment.