Server and client entity update

syncing non networked entities to all players in range
allow for firing functions when entering or exiting the range of the entity
This commit is contained in:
gononono64 committed 2025-04-28 22:51:54 -05:00
1 parent 7cc4821345
commit c23df31199
5 files changed
+417 -96

No files matched your search

+10
View File
@@ -236,6 +236,16 @@ function Point.Get(id)
return ActivePoints[id]
end
function Point.UpdateCoords(id, coords)
local point = ActivePoints[id]
if point then
point.coords = coords
local oldCellKey = point.cellKey
point.cellKey = Point.GetCellKey(coords)
Point.UpdateInGrid(point, oldCellKey)
end
end
---Returns all points
---@return table
function Point.GetAll()