Fixed orient not returning true on possible movement.
This commit is contained in:
parent
d720eaf468
commit
825bc0b523
@ -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, ...)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user