From 1fb0aa763a5c02d257b2080156dd716874c2cc44 Mon Sep 17 00:00:00 2001 From: Nolan Darilek Date: Mon, 16 Oct 2023 07:25:36 -0500 Subject: [PATCH] fix: Clean up `LastAudio` when `Sound` is removed, not `Source`. --- src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index 45e2a1c..b5980b2 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -590,7 +590,7 @@ fn update_sound_playback_state(query: Query<&Sound>) { } } -fn remove_sound(mut last_buffer: ResMut, mut removed: RemovedComponents) { +fn remove_sound(mut last_buffer: ResMut, mut removed: RemovedComponents) { for entity in removed.iter() { last_buffer.remove(&entity); }