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