mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-21 08:09:17 +00:00
Fixed unstore_unit lua code (issue #5519)
x,y were both binding to whole table instead of their expected values
This commit is contained in:
parent
fb07c247e8
commit
add999b9d5
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user