diff options
| author | Valentin Popov <valentin@popov.link> | 2026-11-26 18:43:04 +0300 |
|---|---|---|
| committer | Valentin Popov <valentin@popov.link> | 2026-11-26 18:43:04 +0300 |
| commit | b12a11f00cbd04c053bb6979c0534708d206c46a (patch) | |
| tree | 0a61d49c1bef3c4cb52c3370cc1c0119df422043 /crates | |
| parent | f3f5054641a3542e3154461f39a7a204cfd095ff (diff) | |
| download | fparkan-b12a11f00cbd04c053bb6979c0534708d206c46a.tar.xz fparkan-b12a11f00cbd04c053bb6979c0534708d206c46a.zip | |
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.
Diffstat (limited to 'crates')
| -rw-r--r-- | crates/fparkan-fx/src/ambient_sound.rs | 6 |
1 files changed, 6 insertions, 0 deletions
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. |
