diff options
| author | HampusM <hampus@hampusmat.com> | 2024-04-11 18:14:53 +0200 | 
|---|---|---|
| committer | HampusM <hampus@hampusmat.com> | 2024-04-11 18:14:53 +0200 | 
| commit | 52d737d359bba03b72daefdf1d2b4aac2b543b31 (patch) | |
| tree | a9b8d515ad092359dcc832030b56345d458db850 /ecs/src | |
| parent | f18f020d38ab3d0ab6b290159dff34f7431d2fd2 (diff) | |
fix(ecs): allow queries to contain the same components
Diffstat (limited to 'ecs/src')
| -rw-r--r-- | ecs/src/query.rs | 4 | 
1 files changed, 1 insertions, 3 deletions
| diff --git a/ecs/src/query.rs b/ecs/src/query.rs index 9874b19..683dde7 100644 --- a/ecs/src/query.rs +++ b/ecs/src/query.rs @@ -229,10 +229,8 @@ impl QueryComponentIds              .into_iter()              .collect::<HashSet<TypeId>>(); -        // TODO: Make this a bit smarter. Queries with a same component can be compatible -        // if one of the queries have a component the other one does not have          self.component_type_ids              .iter() -            .any(|component_type_id| other_component_type_ids.contains(component_type_id)) +            .all(|component_type_id| other_component_type_ids.contains(component_type_id))      }  } | 
