provide cx,cz and direction to VP_printstack
This commit is contained in:
11
src/main.lua
11
src/main.lua
@@ -585,15 +585,15 @@ local function VP_moveto(x,z, cx,cz,direction)
|
|||||||
move("back", true)
|
move("back", true)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
while y ~= cz do
|
while z ~= cz do
|
||||||
if y > cz then -- z
|
if z > cz then -- z
|
||||||
if center(direction, 1) then move("right") end
|
if center(direction, 1) then move("right") end
|
||||||
y = VP_movetoy(y, 3)
|
y = VP_movetoy(y, 3)
|
||||||
cz = cz + 1
|
cz = cz + 1
|
||||||
move("forward", true)
|
move("forward", true)
|
||||||
direction = 1
|
direction = 1
|
||||||
end
|
end
|
||||||
if y < cz then
|
if z < cz then
|
||||||
if center(direction, -1) then move("left") end
|
if center(direction, -1) then move("left") end
|
||||||
y = VP_movetoy(y, 4)
|
y = VP_movetoy(y, 4)
|
||||||
cz = cz - 1
|
cz = cz - 1
|
||||||
@@ -790,8 +790,9 @@ while true do
|
|||||||
else
|
else
|
||||||
local buf,dimensions = load(name)
|
local buf,dimensions = load(name)
|
||||||
local stacks = VP_createstack(buf, dimensions)
|
local stacks = VP_createstack(buf, dimensions)
|
||||||
|
|
||||||
VP_printstack(stacks, dimensions)
|
local cx,cz,direction = 1,1,0
|
||||||
|
VP_printstack(stacks, dimensions, cx,cz,direction)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user