fix: Clean up LastAudio
when Sound
is removed, not Source
.
This commit is contained in:
parent
53891eeaa8
commit
1fb0aa763a
|
@ -590,7 +590,7 @@ fn update_sound_playback_state(query: Query<&Sound>) {
|
|||
}
|
||||
}
|
||||
|
||||
fn remove_sound(mut last_buffer: ResMut<LastAudio>, mut removed: RemovedComponents<Source>) {
|
||||
fn remove_sound(mut last_buffer: ResMut<LastAudio>, mut removed: RemovedComponents<Sound>) {
|
||||
for entity in removed.iter() {
|
||||
last_buffer.remove(&entity);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user