camera: tweak sounds of engine and reaction wheel
This commit is contained in:
parent
0dd0474bb0
commit
45a58ac350
|
@ -640,11 +640,12 @@ pub fn apply_input_to_player(
|
||||||
|
|
||||||
// Play sound effects
|
// Play sound effects
|
||||||
if let Some(sink) = sinks.get(&audio::Sfx::ElectricMotor) {
|
if let Some(sink) = sinks.get(&audio::Sfx::ElectricMotor) {
|
||||||
|
let reactionwheel_volume = 1.5;
|
||||||
let volume = sink.volume();
|
let volume = sink.volume();
|
||||||
let speed = sink.speed();
|
let speed = sink.speed();
|
||||||
let action = pitch_yaw_rot.length_squared().powf(0.2) * 0.0005;
|
let action = pitch_yaw_rot.length_squared().powf(0.2) * 0.0005;
|
||||||
if play_reactionwheel_sound && !settings.mute_sfx && bike.is_some() {
|
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.set_speed((speed + action * 0.2).clamp(0.2, 0.5));
|
||||||
sink.play()
|
sink.play()
|
||||||
} else {
|
} else {
|
||||||
|
@ -658,11 +659,11 @@ pub fn apply_input_to_player(
|
||||||
}
|
}
|
||||||
let sinks = vec![
|
let sinks = vec![
|
||||||
(
|
(
|
||||||
1.2,
|
1.0,
|
||||||
actor::EngineType::Monopropellant,
|
actor::EngineType::Monopropellant,
|
||||||
sinks.get(&audio::Sfx::Thruster),
|
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_max_vol = 0.05;
|
||||||
let seconds_to_min_vol = 0.05;
|
let seconds_to_min_vol = 0.05;
|
||||||
|
|
Loading…
Reference in a new issue