Fixing moveto
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user