Performance Improvements

This commit is contained in:
ElCeejo 2022-08-09 15:18:47 -07:00
parent a71cf18e84
commit b8de610493
5 changed files with 144 additions and 101 deletions

View file

@ -74,6 +74,14 @@ function creatura.get_boid_members(pos, radius, name)
table.insert(members, object)
end
end
if #members > 1 then
for _, object in ipairs(members) do
local ent = object and object:get_luaentity()
if ent then
ent._movement_data.boids = members
end
end
end
return members
end