Fix the test_move_unit_in_circle test
Just needed to extract the unit earlier, so that it wouldn't be counted as blocking itself Closes #4635
This commit is contained in:
parent
de92d17a6d
commit
55fa2759a1
2 changed files with 2 additions and 4 deletions
|
@ -79,6 +79,7 @@ function wesnoth.wml_actions.move_unit(cfg)
|
|||
local pass_check = nil
|
||||
if check_passability then pass_check = current_unit end
|
||||
|
||||
current_unit:extract()
|
||||
local x, y = locs(current_unit)
|
||||
local prevX, prevY = tonumber(current_unit.x), tonumber(current_unit.y)
|
||||
while true do
|
||||
|
@ -98,7 +99,6 @@ function wesnoth.wml_actions.move_unit(cfg)
|
|||
elseif current_unit.x > x then current_unit.facing = "sw"
|
||||
end
|
||||
|
||||
current_unit:extract()
|
||||
local current_unit_cfg = current_unit.__cfg
|
||||
wesnoth.wml_actions.move_unit_fake {
|
||||
type = current_unit_cfg.type,
|
||||
|
|
|
@ -274,9 +274,7 @@
|
|||
[/have_unit]
|
||||
)}
|
||||
|
||||
# Move Alice in a circle, ending on the hex that she started on. This will fail if the
|
||||
# implementation chooses a vacant hex based on the starting situation, rather than the
|
||||
# situation before the final nw move.
|
||||
# Move Alice in a circle, ending on the hex that she started on.
|
||||
[move_unit]
|
||||
id=alice
|
||||
dir=sw,s,se,ne,n,nw
|
||||
|
|
Loading…
Add table
Reference in a new issue