From 06df070ba0d7bd2435b8b1313019278090889d09 Mon Sep 17 00:00:00 2001 From: Valentin Popov Date: Tue, 1 Dec 2026 15:12:24 +0400 Subject: fix(audio): play flamer sound from the firing node Feed initial node-attached Op2 rows from the same Control blends as their firing nodes. Keep them separate from projectile one-shots and opcode 10 wind-up sounds. The original Effect.dll confirmed the strict 0.01 threshold. The Constructor replay ordered and boarded the stock warbot, played the heavy flamer before projectile release, and captured the hangar. --- apps/fparkan-game/src/control_effects.rs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'apps/fparkan-game/src/control_effects.rs') diff --git a/apps/fparkan-game/src/control_effects.rs b/apps/fparkan-game/src/control_effects.rs index e3dd50a0..f10a44d9 100644 --- a/apps/fparkan-game/src/control_effects.rs +++ b/apps/fparkan-game/src/control_effects.rs @@ -123,7 +123,11 @@ impl StaticVulkanApp { // Weapon one-shots are already emitted with the projectile. direct_shot_sounds.extend(self.control_sound_slots.iter().filter_map(|sound| { let key = sound.effect.random_instance_key; - (sound.effect.time_mode == 4 && weapon_phases.contains_key(&key)).then_some(key) + (sound.effect.time_mode == 4 + && !sound.follows_weapon_phase + && !sound.waits_for_windup + && weapon_phases.contains_key(&key)) + .then_some(key) })); (samples, direct_shot_sounds) } @@ -212,8 +216,10 @@ pub(super) fn advance_control_effect_instances( for slot in point_light_slots .iter() .chain(sound_slots.iter().filter_map(|slot| { - (!slot.waits_for_windup || states.contains_key(&slot.effect.random_instance_key)) - .then_some(&slot.effect) + let key = slot.effect.random_instance_key; + ((!slot.waits_for_windup || states.contains_key(&key)) + && (!slot.follows_weapon_phase || owner_effect_phase(key).is_some())) + .then_some(&slot.effect) })) { specifications.entry(slot.random_instance_key).or_insert(( -- cgit v1.2.3