woops
This commit is contained in:
1 parent
2501612788
commit
9ee811c2d0
1 file changed
+12
-10
+12
-10
@@ -149,22 +149,24 @@ function Point.StartLoop()
|
|||||||
point.onExit(point)
|
point.onExit(point)
|
||||||
insidePoints[point.id] = nil
|
insidePoints[point.id] = nil
|
||||||
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
|
|
||||||
if point.onNearby then
|
if point.onNearby then
|
||||||
point.onNearby(GridCells[cellKey]?.points, waitTime)
|
point.onNearby(GridCells[cellKey]?.points, waitTime)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
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
|
--kills the loop if no targets exist
|
||||||
--[[
|
--[[
|
||||||
if not targetsExist then
|
if not targetsExist then
|
||||||
|
|||||||
Reference in new issue
Block a user