Use catalog sound identifiers throughout runtime
build / mod (push) Failing after 19s

Co-Authored-By: Codex <noreply@openai.com>
This commit is contained in:
2026-11-04 15:59:12 +03:00
parent 1553976484
commit daa9ed7cbc
6 changed files with 83 additions and 60 deletions
+8 -6
View File
@@ -9,6 +9,8 @@
//! for a tick or two (a step the simulation skipped) does not stop the sound; a *cut* (a replay
//! seek, a new shot) stops every engine and starts them again under new ids, so nothing glides
//! across the jump.
use crate::sim::catalog::sound;
use glam::DVec3;
use std::collections::{BTreeMap, BTreeSet};
@@ -52,12 +54,12 @@ pub enum Op {
/// engine_sounds_has_no_hole` finds them (after the fade-in, before the sound begins to die).
pub fn steady_part(event: &str) -> (f32, f32) {
match event {
"airdef:drone.shahed" => (0.2, 2.2),
"airdef:drone.geran3" => (0.2, 2.0),
"airdef:drone.lancet" => (0.2, 1.4),
"airdef:drone.cruise" => (0.2, 2.6),
"airdef:drone.rocket" => (0.2, 2.6),
"airdef:missile.flight" => (0.2, 2.2),
sound::DRONE_SHAHED => (0.2, 2.2),
sound::DRONE_GERAN3 => (0.2, 2.0),
sound::DRONE_LANCET => (0.2, 1.4),
sound::DRONE_CRUISE => (0.2, 2.6),
sound::DRONE_ROCKET => (0.2, 2.6),
sound::MISSILE_FLIGHT => (0.2, 2.2),
_ => (0.0, 0.0),
}
}