mirror of
https://github.com/Ukendio/jecs.git
synced 2025-04-24 17:10:03 +00:00
Update newMatter.lua
This commit is contained in:
parent
a2f47ae7aa
commit
cb8df4a99d
1 changed files with 2 additions and 8 deletions
|
@ -666,17 +666,11 @@ end
|
|||
|
||||
local function get(componentIndex: ComponentIndex, record: Record, componentId: i24): ComponentInstance?
|
||||
local archetype = record.archetype
|
||||
local map = componentIndex[componentId]
|
||||
if map == nil then
|
||||
return nil
|
||||
end
|
||||
|
||||
if archetype == nil then
|
||||
-- TODO... what?
|
||||
return nil
|
||||
end
|
||||
|
||||
local archetypeRecord = map.sparse[archetype.id]
|
||||
local archetypeRecord = archetype.records[componentId]
|
||||
if not archetypeRecord then
|
||||
return nil
|
||||
end
|
||||
|
@ -1414,7 +1408,7 @@ function World.queryChanged(world: World, componentToTrack, ...: nil)
|
|||
return
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
return {
|
||||
World = World,
|
||||
component = newComponent
|
||||
|
|
Loading…
Reference in a new issue