From 3963b548b9facdcd35479f8b46d6d99793f3876c Mon Sep 17 00:00:00 2001 From: Robert Garrett Date: Wed, 17 Dec 2025 14:23:57 -0600 Subject: [PATCH] Fix: Make shipwreck sound entity despawn itself I started to work on weapon fire sounds and realized I don't know if the entity and/or component get removed after playback ends. It turns out that they DO NOT!... unless told to do so, like this. --- src/objects.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/objects.rs b/src/objects.rs index 72cdf65..3a91dec 100644 --- a/src/objects.rs +++ b/src/objects.rs @@ -237,7 +237,7 @@ pub fn ship_impact_listener( // STEP 5: Play crash sound commands.spawn(( AudioPlayer::new(game_assets.wreck_sound()), - PlaybackSettings::ONCE, + PlaybackSettings::DESPAWN, // despawn this entity when playback ends. )); } }