From b12a11f00cbd04c053bb6979c0534708d206c46a Mon Sep 17 00:00:00 2001 From: Valentin Popov Date: Thu, 26 Nov 2026 19:43:04 +0400 Subject: fix(audio): play projectile launch sounds Read phase-zero one-shot sounds from the projectile's initial Control effect group. Reuse the decoded effects for trails and play the launch sounds when the weapon creates a projectile. The native mode-1 phase probe and the licensed hero missile fixture both pass. A replayed trigger at the stock Firing Line start queued H_fire_missile.wav once and Vulkan validation was clean. --- crates/fparkan-fx/src/ambient_sound.rs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'crates/fparkan-fx') diff --git a/crates/fparkan-fx/src/ambient_sound.rs b/crates/fparkan-fx/src/ambient_sound.rs index c15e0637..7e8a57a6 100644 --- a/crates/fparkan-fx/src/ambient_sound.rs +++ b/crates/fparkan-fx/src/ambient_sound.rs @@ -107,6 +107,12 @@ impl Op2SoundCommand { }) } + /// Tests whether a non-looping sound starts at the first phase crossing. + #[must_use] + pub fn starts_at_spawn(&self) -> bool { + !self.looping && self.start == 0.0 + } + /// Evaluates Effect.dll's phase crossings and current source parameters. /// `playing` comes from the audio owner, since a one-shot can finish between /// updates. The matrix maps local command coordinates into world space. -- cgit v1.2.3