mirror of
https://github.com/ElCeejo/creatura.git
synced 2025-07-21 14:55:04 -04:00
Performance Improvements
This commit is contained in:
parent
a71cf18e84
commit
b8de610493
5 changed files with 144 additions and 101 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue