aboutsummaryrefslogtreecommitdiff
path: root/apps/fparkan-game/src/audio.rs
diff options
context:
space:
mode:
authorValentin Popov <valentin@popov.link>2026-12-01 20:55:38 +0300
committerValentin Popov <valentin@popov.link>2026-12-01 20:55:38 +0300
commitd154efdd050e730c4072e5f53843cf3610651d00 (patch)
treefdd0c56d5232dd958f529d6faefb0f585944057e /apps/fparkan-game/src/audio.rs
parent697241b84fb0446af5feba8eb1f78b3b04cdd5a4 (diff)
downloadfparkan-d154efdd050e730c4072e5f53843cf3610651d00.tar.xz
fparkan-d154efdd050e730c4072e5f53843cf3610651d00.zip
feat(player): announce vehicle capture when the hero stays outside
Restore the original warbot and mobile command centre acknowledgement bank. A capture that also seats the hero remains silent. The bank and non-repeat selection were checked against the native DLL, and a walk from the normal Teleport start queued the authored voice before the objective notice.
Diffstat (limited to 'apps/fparkan-game/src/audio.rs')
-rw-r--r--apps/fparkan-game/src/audio.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/apps/fparkan-game/src/audio.rs b/apps/fparkan-game/src/audio.rs
index e4580707..90ddd6d7 100644
--- a/apps/fparkan-game/src/audio.rs
+++ b/apps/fparkan-game/src/audio.rs
@@ -21,6 +21,8 @@ use std::io::Cursor;
use std::sync::{Arc, Mutex};
use std::time::{SystemTime, UNIX_EPOCH};
+mod capture_voice;
+
const SWAV_TYPE: u32 = u32::from_le_bytes(*b"SWAV");
const DEFAULT_MUSIC_TRACK: u8 = 2;
const FIRST_MUSIC_TRACK: u8 = 2;
@@ -636,6 +638,7 @@ pub(crate) struct GameAudio {
music: Player,
variations: Player,
mission_voice: Player,
+ vehicle_capture_voice: capture_voice::VehicleCaptureVoice,
mission_cfg: NormalizedPath,
weather_loop: NativeSpatialPlayer,
control_sounds: BTreeMap<ControlSoundId, NativeSpatialPlayer>,
@@ -683,6 +686,7 @@ impl GameAudio {
music,
variations,
mission_voice,
+ vehicle_capture_voice: capture_voice::VehicleCaptureVoice::new(random_seed()),
mission_cfg,
weather_loop,
control_sounds: BTreeMap::new(),