aboutsummaryrefslogtreecommitdiff
path: root/crates/fparkan-runtime/src/lib.rs
diff options
context:
space:
mode:
authorValentin Popov <valentin@popov.link>2026-11-26 19:02:16 +0300
committerValentin Popov <valentin@popov.link>2026-11-26 19:02:16 +0300
commit4367287f9e07aca6a173a5eaef641a75918d66e0 (patch)
tree84aaf51a48c743b5a5d9fc85a1f52a166a2fcb02 /crates/fparkan-runtime/src/lib.rs
parentb12a11f00cbd04c053bb6979c0534708d206c46a (diff)
downloadfparkan-4367287f9e07aca6a173a5eaef641a75918d66e0.tar.xz
fparkan-4367287f9e07aca6a173a5eaef641a75918d66e0.zip
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.
Diffstat (limited to 'crates/fparkan-runtime/src/lib.rs')
-rw-r--r--crates/fparkan-runtime/src/lib.rs9
1 files changed, 7 insertions, 2 deletions
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 {