Fixed orient not returning true on possible movement.

This commit is contained in:
Harrison Deng 2021-05-05 18:58:11 -05:00
parent d720eaf468
commit 825bc0b523

View File

@ -250,7 +250,7 @@ end
local function orient(v, forward, right) local function orient(v, forward, right)
print("Attempting to orient such that " .. tostring(v) .. " == " .. tostring(forward) .. ".") print("Attempting to orient such that " .. tostring(v) .. " == " .. tostring(forward) .. ".")
if vectorEqual(v, forward) then if vectorEqual(v, forward) then
return return true
elseif vectorEqual(v, right) then elseif vectorEqual(v, right) then
return attemptMoveRight() return attemptMoveRight()
elseif vectorEqual(v, -right) then elseif vectorEqual(v, -right) then
@ -258,7 +258,7 @@ local function orient(v, forward, right)
else else
return attemptMoveRight() and attemptMoveRight() return attemptMoveRight() and attemptMoveRight()
end end
print("Orientation complete.") return false
end end
local function attemptStartTask(name, f, ...) local function attemptStartTask(name, f, ...)