This commit is contained in:
gononono64 committed 2025-03-24 19:03:09 -05:00
1 parent 2501612788
commit 9ee811c2d0
1 file changed
+12 -10
+12 -10
View File
@@ -149,22 +149,24 @@ function Point.StartLoop()
point.onExit(point)
insidePoints[point.id] = nil
end
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 dist = #(playerCoords - pos)
if dist > insidepoint.distance then
print("Exited point: ", insidepoint.id)
insidepoint.inside = false
insidepoint.onExit(insidepoint)
insidePoints[insidepoint.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
local pos = insidepoint.coords and vector3(insidepoint.coords.x, insidepoint.coords.y, insidepoint.coords.z) or vector3(0, 0, 0)
local dist = #(playerCoords - pos)
if dist > insidepoint.distance then
print("Exited point: ", insidepoint.id)
insidepoint.inside = false
insidepoint.onExit(insidepoint)
insidePoints[insidepoint.id] = nil
end
end
--kills the loop if no targets exist
--[[
if not targetsExist then