Develop 1.8 #20

Merged
Kan18 merged 242 commits from develop-1.8 into master-1.8 2019-11-10 20:52:08 -05:00
Showing only changes of commit b761b3429a - Show all commits

View File

@@ -177,7 +177,12 @@ function Point.closest(reference, pts)
local lm, lpt = math.huge
for _,pt in pairs(pts) do
local distance = Point.turtleDistance(reference, pt)
if distance < lm then
if not reference.heading then
if distance < lm then
lpt = pt
lm = distance
end
elseif distance < lm then
local _, _, m = Point.calculateMoves(reference, pt, distance)
if m < lm then
lpt = pt