Fixing moveto
This commit is contained in:
parent
e6d75af1f7
commit
48af2c55cf
@ -374,8 +374,8 @@ local function moveTo(dest, range)
|
|||||||
end
|
end
|
||||||
local xBlocked, yBlocked, zBlocked = false, false, false
|
local xBlocked, yBlocked, zBlocked = false, false, false
|
||||||
local oldPos = nil
|
local oldPos = nil
|
||||||
while not vectorEqual(dest, position) do
|
while oldPos == nil or not vectorEqual(dest, position) do
|
||||||
if vectorEqual(oldPos, position) then
|
if oldPos ~= nil and vectorEqual(oldPos, position) then
|
||||||
sendLog(FAILED, "Cannot proceed to due obstacle.")
|
sendLog(FAILED, "Cannot proceed to due obstacle.")
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user