aboutsummaryrefslogtreecommitdiff
path: root/apps/fparkan-game/src/main.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 /apps/fparkan-game/src/main.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 'apps/fparkan-game/src/main.rs')
-rw-r--r--apps/fparkan-game/src/main.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/apps/fparkan-game/src/main.rs b/apps/fparkan-game/src/main.rs
index 8d5c0c68..6f050780 100644
--- a/apps/fparkan-game/src/main.rs
+++ b/apps/fparkan-game/src/main.rs
@@ -11682,9 +11682,11 @@ impl StaticVulkanApp {
projectile_sound::update(
audio,
&mut self.projectile_draws,
- self.control_sound_slots.len(),
+ &self.autodemo_draws,
+ self.mission_engine.as_ref(),
)?;
for (id, sound) in self.control_sound_slots.iter_mut().enumerate() {
+ let id = audio::ControlSoundId::Effect(id);
let slot = &mut sound.effect;
if self
.removed_mission_roots
@@ -11731,7 +11733,7 @@ impl StaticVulkanApp {
) {
audio
.handle_control_sound(id, &event)
- .map_err(|error| format!("play Control sound {id}: {error}"))?;
+ .map_err(|error| format!("play Control sound {id:?}: {error}"))?;
}
}
}