mirror of
https://github.com/bakpakin/tiny-ecs.git
synced 2026-07-22 07:56:52 -06:00
Fix small but devestating bug for systems without Entities.
This commit is contained in:
@@ -340,11 +340,13 @@ function World:updateSystem(system, dt)
|
|||||||
if update then
|
if update then
|
||||||
local entities = self.entities
|
local entities = self.entities
|
||||||
local eids = systemEntities[system.id]
|
local eids = systemEntities[system.id]
|
||||||
|
if eids then
|
||||||
for eid in pairs(eids) do
|
for eid in pairs(eids) do
|
||||||
update(entities[eid], dt)
|
update(entities[eid], dt)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
-- World:update()
|
-- World:update()
|
||||||
|
|
||||||
-- Updates the World, frees Entities that have been marked for freeing, adds
|
-- Updates the World, frees Entities that have been marked for freeing, adds
|
||||||
|
|||||||
Reference in New Issue
Block a user