Skip to content

Commit

Permalink
reclaim field highlight: fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Ruwetuin committed Aug 24, 2024
1 parent b56c9ec commit bf0020b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions luaui/Widgets/gui_reclaim_field_highlight.lua
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ do
-- a random point, but we know its furthest neighbors are later on in the sequence.
local middle = floor(#points * 0.5)
local x, z = points[1].x, points[1].z
x, z = x + points[middle].x, z + points[middle].z
x, z = x + points[middle].x, z + points[middle].z
x, z = x + points[#points].x, z + points[#points].z
x, z = x / 3, z / 3

Expand All @@ -257,6 +257,7 @@ do

-- (3) The algorithm performs two passes, with the first covering the full set.
for ii = 1, #points do
local point = points[ii]
local x, z = point.x, point.z
if x <= rxmin or x >= rxmax or z <= rzmin or z >= rzmax then
-- Keep points that fall outside the inscribed rectangle.
Expand Down Expand Up @@ -419,7 +420,7 @@ do
return totalArea
end

processCluster = function (cluster, clusterID, points)
processCluster = function (cluster, clusterID, points)
getReclaimTotal(cluster, points)

local convexHull
Expand Down

0 comments on commit bf0020b

Please sign in to comment.