reset direction under moveto when going forward or backward
This commit is contained in:
@@ -308,11 +308,13 @@ local function moveto(x,y,cx,cz,direction)
|
|||||||
while x ~= cx or y ~= cz do
|
while x ~= cx or y ~= cz do
|
||||||
if cx < x then -- x
|
if cx < x then -- x
|
||||||
center(direction)
|
center(direction)
|
||||||
|
direction = 0
|
||||||
cx = cx + 1
|
cx = cx + 1
|
||||||
move("forward")
|
move("forward")
|
||||||
end
|
end
|
||||||
if cx > x then
|
if cx > x then
|
||||||
center(direction)
|
center(direction)
|
||||||
|
direction = 0
|
||||||
cx = cx - 1
|
cx = cx - 1
|
||||||
move("back")
|
move("back")
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user