Moveto exits when lacking location information.

This commit is contained in:
Harrison Deng 2021-05-05 18:55:44 -05:00
parent 2c4d70fe08
commit d720eaf468

View File

@ -370,6 +370,7 @@ local function moveTo(dest, range)
sendLog(MOVETO, "Attempting to move by (" .. dest.x .. "," .. dest.y .. "," .. dest.z .. ") (x,y,z).") sendLog(MOVETO, "Attempting to move by (" .. dest.x .. "," .. dest.y .. "," .. dest.z .. ") (x,y,z).")
if position == nil or heading == nil then if position == nil or heading == nil then
sendLog(FAILED, "Position or heading is invalid.") sendLog(FAILED, "Position or heading is invalid.")
return
end end
local xBlocked, yBlocked, zBlocked = false, false, false local xBlocked, yBlocked, zBlocked = false, false, false
local oldPos = nil local oldPos = nil