less indexing

This commit is contained in:
HowManySmall 2024-05-04 16:29:20 -06:00
parent c7113d6bc9
commit 038b94fed5

View file

@ -468,13 +468,13 @@ function World.query(world: World, ...: i53): Query
preparedQuery.__index = preparedQuery preparedQuery.__index = preparedQuery
function preparedQuery:without(...) function preparedQuery:without(...)
local components = {...} local withoutComponents = {...}
for i = #compatibleArchetypes, 1, -1 do for i = #compatibleArchetypes, 1, -1 do
local archetype = compatibleArchetypes[i][1] local archetype = compatibleArchetypes[i][1]
local records = archetype.records local records = archetype.records
local shouldRemove = false local shouldRemove = false
for _, componentId in components do for _, componentId in withoutComponents do
if records[componentId] then if records[componentId] then
shouldRemove = true shouldRemove = true
break break