Simplify calculation query.

This commit is contained in:
Nolan Darilek 2021-07-27 20:12:36 -05:00
parent a4f0fa8aa4
commit ae46114f6d

View File

@ -183,10 +183,7 @@ fn calculate_path(
query_pipeline: Res<QueryPipeline>, query_pipeline: Res<QueryPipeline>,
obstructions: Query<&MapObstruction>, obstructions: Query<&MapObstruction>,
collider_query: QueryPipelineColliderComponentsQuery, collider_query: QueryPipelineColliderComponentsQuery,
query: Query< query: Query<(Entity, &Destination, &Coordinates, &ColliderShape), Changed<Destination>>,
(Entity, &Destination, &Coordinates, &ColliderShape),
(Without<Calculating>, Without<NoPath>, Without<Path>),
>,
map: Query<&Map>, map: Query<&Map>,
) { ) {
for (entity, destination, coordinates, shape) in query.iter() { for (entity, destination, coordinates, shape) in query.iter() {