From 3e41c9130efa2aafd704acf757ac180e8f2aca79 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Wed, 13 May 2026 11:59:04 +0200 Subject: [PATCH] fix(enemy): make entering_query and path_query disjoint to avoid B0001 panic move_enemies takes &mut Transform and &mut EnemyState in both entering_query (With) and path_query (With). Although spawn_enemies never gives an entity both components, Bevy's static access checker cannot infer that and panics with B0001 on schedule init. Add Without to entering_query so the filters are provably disjoint. --- src/enemy.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/enemy.rs b/src/enemy.rs index 82ca360..6163de3 100644 --- a/src/enemy.rs +++ b/src/enemy.rs @@ -182,7 +182,7 @@ pub fn spawn_enemies( pub fn move_enemies( mut entering_query: Query< (Entity, &mut Transform, &FormationTarget, &mut EnemyState), - (With, With), + (With, With, Without), >, mut path_query: Query<(Entity, &mut Transform, &mut EnemyState), With>, mut attacking_query: Query<