From 45a58ac350719af9a48ff2b8e93aed60b04a5e75 Mon Sep 17 00:00:00 2001 From: yuni Date: Sun, 15 Sep 2024 05:11:57 +0200 Subject: [PATCH] camera: tweak sounds of engine and reaction wheel --- src/camera.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/camera.rs b/src/camera.rs index 4aecdaa..c29a154 100644 --- a/src/camera.rs +++ b/src/camera.rs @@ -640,11 +640,12 @@ pub fn apply_input_to_player( // Play sound effects if let Some(sink) = sinks.get(&audio::Sfx::ElectricMotor) { + let reactionwheel_volume = 1.5; let volume = sink.volume(); let speed = sink.speed(); let action = pitch_yaw_rot.length_squared().powf(0.2) * 0.0005; if play_reactionwheel_sound && !settings.mute_sfx && bike.is_some() { - sink.set_volume((volume + action).clamp(0.0, 1.0)); + sink.set_volume(reactionwheel_volume * (volume + action).clamp(0.0, 1.0)); sink.set_speed((speed + action * 0.2).clamp(0.2, 0.5)); sink.play() } else { @@ -658,11 +659,11 @@ pub fn apply_input_to_player( } let sinks = vec![ ( - 1.2, + 1.0, actor::EngineType::Monopropellant, sinks.get(&audio::Sfx::Thruster), ), - (1.4, actor::EngineType::Ion, sinks.get(&audio::Sfx::Ion)), + (1.0, actor::EngineType::Ion, sinks.get(&audio::Sfx::Ion)), ]; let seconds_to_max_vol = 0.05; let seconds_to_min_vol = 0.05;