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<FormationTarget>) and path_query (With<ScriptedPath>).
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<ScriptedPath> to entering_query so the filters are provably
disjoint.
This commit is contained in:
Harald Hoyer 2026-05-13 11:59:04 +02:00
parent 8e6865dfa4
commit 3e41c9130e

View file

@ -182,7 +182,7 @@ pub fn spawn_enemies(
pub fn move_enemies(
mut entering_query: Query<
(Entity, &mut Transform, &FormationTarget, &mut EnemyState),
(With<Enemy>, With<FormationTarget>),
(With<Enemy>, With<FormationTarget>, Without<ScriptedPath>),
>,
mut path_query: Query<(Entity, &mut Transform, &mut EnemyState), With<ScriptedPath>>,
mut attacking_query: Query<