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:
parent
8e6865dfa4
commit
3e41c9130e
1 changed files with 1 additions and 1 deletions
|
|
@ -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<
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue