This commit is contained in:
gononono64 committed 2025-03-24 19:03:09 -05:00
1 parent 2501612788
commit 9ee811c2d0
1 file changed
+8 -6
+8 -6
View File
@@ -149,6 +149,14 @@ function Point.StartLoop()
point.onExit(point) point.onExit(point)
insidePoints[point.id] = nil insidePoints[point.id] = nil
end end
if point.onNearby then
point.onNearby(GridCells[cellKey]?.points, waitTime)
end
end
end
end
for id, insidepoint in pairs(insidePoints) do for id, insidepoint in pairs(insidePoints) do
local pos = insidepoint.coords and vector3(insidepoint.coords.x, insidepoint.coords.y, insidepoint.coords.z) or vector3(0, 0, 0) local pos = insidepoint.coords and vector3(insidepoint.coords.x, insidepoint.coords.y, insidepoint.coords.z) or vector3(0, 0, 0)
local dist = #(playerCoords - pos) local dist = #(playerCoords - pos)
@@ -159,12 +167,6 @@ function Point.StartLoop()
insidePoints[insidepoint.id] = nil insidePoints[insidepoint.id] = nil
end end
end end
if point.onNearby then
point.onNearby(GridCells[cellKey]?.points, waitTime)
end
end
end
end
--kills the loop if no targets exist --kills the loop if no targets exist
--[[ --[[
if not targetsExist then if not targetsExist then