Fix [unstore_unit]x,y=recall,recall

Fixes #5604
This commit is contained in:
Celtic Minstrel 2021-03-12 19:46:35 -05:00 committed by GitHub
parent e720a437b0
commit e0c1ac2626
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -845,7 +845,7 @@ wml_actions.unstore_unit = function(cfg)
x,y = table.unpack(wesnoth.special_locations[cfg.location_id])
end
wesnoth.add_known_unit(unit.type)
if wesnoth.current.map:on_board(x, y) then
if x ~= 'recall' and y ~= 'recall' and wesnoth.current.map:on_board(x, y) then
if cfg.find_vacant then
x,y = wesnoth.find_vacant_tile(x, y, check_passability and unit)
end