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:
1 parent
7cc4821345
commit
c23df31199
5 files changed
+417
-96
No files matched your search
@@ -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()
|
||||
|
||||
Reference in new issue
Block a user