Only clear source handles if PannerStrategy
is actually changed (I.e. mutated, not added.)
This commit is contained in:
parent
72c63af910
commit
ba45547038
|
@ -332,14 +332,16 @@ fn swap_buffers(
|
|||
}
|
||||
|
||||
fn change_panner_strategy(
|
||||
changed: Query<Entity, Changed<PannerStrategy>>,
|
||||
changed: Query<(Entity, ChangeTrackers<PannerStrategy>)>,
|
||||
removed: RemovedComponents<PannerStrategy>,
|
||||
mut sources: Query<&mut Source>,
|
||||
) {
|
||||
let mut check = vec![];
|
||||
for entity in &changed {
|
||||
for (entity, change) in &changed {
|
||||
if !change.is_added() && change.is_changed() {
|
||||
check.push(entity);
|
||||
}
|
||||
}
|
||||
for entity in removed.iter() {
|
||||
check.push(entity);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user