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 function get(componentIndex: ComponentIndex, record: Record, componentId: i24): ComponentInstance?
local archetype = record.archetype local archetype = record.archetype
local map = componentIndex[componentId]
if map == nil then
return nil
end
if archetype == nil then if archetype == nil then
-- TODO... what?
return nil return nil
end end
local archetypeRecord = map.sparse[archetype.id] local archetypeRecord = archetype.records[componentId]
if not archetypeRecord then if not archetypeRecord then
return nil return nil
end end