From 2e0a4571af587f28ba5ea580f177a225d0d352e2 Mon Sep 17 00:00:00 2001 From: Valentin Popov Date: Thu, 26 Nov 2026 20:09:41 +0400 Subject: fix(audio): attach the engine loop to the player's missile Prepare velocity-driven Op2 sounds with the projectile's CTL attachment. Move their source with the active flight and stop it when the flight ends or its slot is reused. Keep launch as a separate one-shot. The GOG phase function confirms the missile's 0 to 1 phase range. In the stock Firing Line window the engine loop began at the tail and stopped on terrain contact. --- crates/fparkan-runtime/src/projectile.rs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'crates/fparkan-runtime/src') diff --git a/crates/fparkan-runtime/src/projectile.rs b/crates/fparkan-runtime/src/projectile.rs index ff745655..312371d8 100644 --- a/crates/fparkan-runtime/src/projectile.rs +++ b/crates/fparkan-runtime/src/projectile.rs @@ -134,6 +134,11 @@ impl PlayerProjectile { }) } + /// Queue time at launch, retained when the projectile's pose changes. + pub fn born_ms(&self) -> u32 { + self.born_ms + } + /// Advances this projectile and returns whether it remains in flight. /// The callback identifies contacts with the world along the traveled segment. pub fn advance( -- cgit v1.2.3