Update code of [unstore_unit]
This commit is contained in:
parent
73a76a1644
commit
f5ea3b0906
1 changed files with 2 additions and 2 deletions
|
@ -790,7 +790,7 @@ 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 = table.unpack(wesnoth.special_locations[cfg.location_id])
|
||||
x,y = table.unpack(wesnoth.current.map.special_locations[cfg.location_id])
|
||||
end
|
||||
wesnoth.add_known_unit(unit.type)
|
||||
if x ~= 'recall' and y ~= 'recall' and wesnoth.current.map:on_board(x, y) then
|
||||
|
@ -829,7 +829,7 @@ wml_actions.teleport = function(cfg)
|
|||
end
|
||||
local x,y = cfg.x, cfg.y
|
||||
if cfg.location_id then
|
||||
x,y = table.unpack(wesnoth.special_locations[cfg.location_id])
|
||||
x,y = table.unpack(wesnoth.current.map.special_locations[cfg.location_id])
|
||||
end
|
||||
wesnoth.teleport(unit, x, y, cfg.check_passability == false, cfg.clear_shroud ~= false, cfg.animate)
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue