aboutsummaryrefslogtreecommitdiff
path: root/crates/fparkan-runtime/src/lib.rs
diff options
context:
space:
mode:
authorValentin Popov <valentin@popov.link>2026-12-01 06:18:14 +0300
committerValentin Popov <valentin@popov.link>2026-12-01 06:18:14 +0300
commitc83b6fcdc97a193184552b436086a76679d024ba (patch)
treea7d2385630e2187ad21cec5a7b86f6c1e7102eff /crates/fparkan-runtime/src/lib.rs
parent659f80b53bcc1ed45b2cd30832ca4423cd2391ee (diff)
downloadfparkan-c83b6fcdc97a193184552b436086a76679d024ba.tar.xz
fparkan-c83b6fcdc97a193184552b436086a76679d024ba.zip
fix(audio): play engine loops for autonomous missiles
Keep one spatial Op2 source per flight while it moves, with separate identities from manual and scene emitters. Confirm the original mode 5 phase and verify launch, overlap and teardown on the GOG AutoDemo. Flight-speed changes and a listening comparison with the original remain open.
Diffstat (limited to 'crates/fparkan-runtime/src/lib.rs')
-rw-r--r--crates/fparkan-runtime/src/lib.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/crates/fparkan-runtime/src/lib.rs b/crates/fparkan-runtime/src/lib.rs
index 1a9eb405..cdd8d35a 100644
--- a/crates/fparkan-runtime/src/lib.rs
+++ b/crates/fparkan-runtime/src/lib.rs
@@ -3459,6 +3459,13 @@ pub fn autonomous_weapon_effects(engine: &Engine) -> &[(String, String)] {
pub fn autodemo_projectiles(
engine: &Engine,
) -> impl Iterator<Item = (usize, PlayerProjectile)> + '_ {
+ autonomous_projectile_flights(engine).map(|(_, projectile, pose)| (projectile, pose))
+}
+
+/// Active autonomous flights with IDs stable across combat steps and pool reuse.
+pub fn autonomous_projectile_flights(
+ engine: &Engine,
+) -> impl Iterator<Item = (u64, usize, PlayerProjectile)> + '_ {
engine
.autodemo_combat
.iter()