Update newMatter.lua

This commit is contained in:
Michael 2024-05-02 22:22:48 -04:00 committed by GitHub
parent a2f47ae7aa
commit cb8df4a99d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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