Fix computing ecs table query cache in the presence of without<> components

This commit is contained in:
Nikita Lisitsa 2024-01-30 21:57:21 +03:00
parent 88677eb893
commit 92f02d8ac0

View file

@ -86,6 +86,7 @@ namespace psemek::ecs::detail
for (auto & cache_set : caches_) for (auto & cache_set : caches_)
{ {
bool good = true; bool good = true;
for (auto const & uuid : cache_set->with_uuids) for (auto const & uuid : cache_set->with_uuids)
if (!contains_uuid(uuid)) if (!contains_uuid(uuid))
{ {
@ -93,6 +94,13 @@ namespace psemek::ecs::detail
break; break;
} }
for (auto const & uuid : cache_set->without_uuids)
if (contains_uuid(uuid))
{
good = false;
break;
}
if (!good) if (!good)
continue; continue;