fix: keep the P1-SUN motor voice at its played 1.6 pitch

The old engine_voice returned early for flame == 0 with
(DRONE_LANCET, 0.8, 1.6), so the later `P1sun => 1.7` match arm was
unreachable. The catalog migration mistook that arm for the played value
and stored 1.7, which changed the interceptor drone's flight sound.
specs.json is back to 1.6 and specs_generated.rs is regenerated.

Adds missile_engine_voices_keep_their_played_values, pinning P1-SUN to
(DRONE_LANCET, 0.8, 1.6) and M48N6 to (MISSILE_FLIGHT, 1.0, 0.88).

The continuation and handoff text now describe the early return instead
of the dead arm, and tools/airdef_assets/catalog.py gets its final
newline back.

Verified: gen_catalog --check and test_gen_assets, core release
195 passed + 8 scenarios (7 ignored), adapter 64 unit + 1 boundary +
5 scenarios, WASM contract 27 steps.
This commit is contained in:
2026-11-04 20:37:26 +03:00
parent ead87343d2
commit 0937ac9e05
6 changed files with 27 additions and 11 deletions
+1 -1
View File
@@ -452,7 +452,7 @@ const MISSILE_SPEC_P1SUN: MissileSpec = MissileSpec {
rear: 10.0,
seeker: 60.0,
launch_sound: sound::DRONE_LANCET,
voice: (sound::DRONE_LANCET, 0.8, 1.7),
voice: (sound::DRONE_LANCET, 0.8, 1.6),
};
impl DroneKind {
+14
View File
@@ -25,3 +25,17 @@ impl MissileKind {
self.spec().cold
}
}
#[cfg(test)]
mod tests {
use super::*;
use super::super::catalog::sound;
/// The catalog holds the voice that is actually played. P1-SUN has no flame, so it uses the
/// Lancet voice at 1.6; its old `P1sun => 1.7` match arm was unreachable behind `flame == 0`.
#[test]
fn missile_engine_voices_keep_their_played_values() {
assert_eq!(MissileKind::P1sun.engine_voice(), (sound::DRONE_LANCET, 0.8, 1.6));
assert_eq!(MissileKind::M48n6.engine_voice(), (sound::MISSILE_FLIGHT, 1.0, 0.88));
}
}