Skip to content
This repository has been archived by the owner on Jul 16, 2024. It is now read-only.

Commit

Permalink
Separate changes from archetype-negation
Browse files Browse the repository at this point in the history
  • Loading branch information
Ukendio committed Dec 31, 2023
1 parent c8e89d7 commit 5c3a342
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions lib/World.lua
Original file line number Diff line number Diff line change
Expand Up @@ -194,17 +194,7 @@ function World:_newQueryArchetype(queryArchetype)

for _, storage in self._storages do
for entityArchetype in storage do
local archetype = string.split(queryArchetype, "||")
local negatedArchetype = archetype[1]
local exclude = archetype[2]

if exclude then
if areArchetypesCompatible(exclude, entityArchetype) then
continue
end
end

if areArchetypesCompatible(negatedArchetype, entityArchetype) then
if areArchetypesCompatible(queryArchetype, entityArchetype) then
self._queryCache[queryArchetype][entityArchetype] = true
end
end
Expand Down

0 comments on commit 5c3a342

Please sign in to comment.