From 4367287f9e07aca6a173a5eaef641a75918d66e0 Mon Sep 17 00:00:00 2001 From: Valentin Popov Date: Thu, 26 Nov 2026 20:02:16 +0400 Subject: fix(audio): start node-attached laser sounds during wind-up Use the weapon descriptor's Control group to select the mode-1 sound rows. Update them through the existing FX clock and spatial Op2 playback for both manual and autonomous weapons. The GOG Control/Effect entry points confirm the selector, epoch and phase threshold, including retriggering after a sample at the exact phase peak. The stock Two Fortresses helicopter started the original sound at both weapon nodes in a Vulkan window. --- crates/fparkan-runtime/src/lib.rs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'crates/fparkan-runtime/src/lib.rs') diff --git a/crates/fparkan-runtime/src/lib.rs b/crates/fparkan-runtime/src/lib.rs index 1a32d6cd..02333bd0 100644 --- a/crates/fparkan-runtime/src/lib.rs +++ b/crates/fparkan-runtime/src/lib.rs @@ -3253,7 +3253,9 @@ pub fn simulate_mission_report( AutoDemoCombatEvent::Destroyed { .. } => { report.autodemo_first_destroyed_ms.get_or_insert(clock_ms) } - AutoDemoCombatEvent::BuildingHit { .. } => continue, + AutoDemoCombatEvent::BuildingHit { .. } | AutoDemoCombatEvent::WindupSound(_) => { + continue + } }; } report.mission_messages += frame @@ -8827,6 +8829,7 @@ mod tests { effect_section: PreparedControlEffectSection::Parsed(rows), initial_effect_group, node_effect_links: Vec::new(), + effect_modes: Vec::new(), point_list: point_count.map(|count| PreparedControlPointList { source: synthetic_resource_key(941), points: (0..count) @@ -9332,6 +9335,7 @@ mod tests { effect_section, initial_effect_group: None, node_effect_links: Vec::new(), + effect_modes: Vec::new(), point_list: None, } } @@ -16678,7 +16682,8 @@ mod tests { .any(|(handle, _)| *handle == target)); first_destroyed.get_or_insert(now); } - AutoDemoCombatEvent::BuildingHit { .. } => {} + AutoDemoCombatEvent::BuildingHit { .. } + | AutoDemoCombatEvent::WindupSound(_) => {} } } for replacement in result.autodemo_reinforcements { -- cgit v1.2.3