properly mute reaction wheel sounds
This commit is contained in:
parent
d4ddead644
commit
5b1d6588f9
20
README.md
20
README.md
|
@ -17,23 +17,23 @@ Key features:
|
||||||
|
|
||||||
# Key Bindings
|
# Key Bindings
|
||||||
|
|
||||||
- Space: stop moving
|
- Space: slow down
|
||||||
- AWSD: accelerate
|
- AWSD: accelerate
|
||||||
- Shift and Ctrl: accelerate up and down
|
- Shift and Ctrl: accelerate up and down
|
||||||
- JKLUIO: mouseless camera rotation
|
- JKLUIO: mouseless camera rotation
|
||||||
- e: interact: talk to people, enter vehicles
|
- E: interact: talk to people, enter vehicles
|
||||||
- t: toggle music (NOTE: currently no music is included in the git repo)
|
- T: toggle music (NOTE: currently no music is included in the git repo)
|
||||||
- m: mute sound effects
|
- M: mute sound effects
|
||||||
- q: exit vehicle
|
- Q: exit vehicle
|
||||||
- r: rotate (hold r while moving the mouse)
|
- R: rotate (hold r while moving the mouse)
|
||||||
- f: toggle 3rd person view
|
- F: toggle 3rd person view
|
||||||
- TAB: toggle augmented reality overlay (HUD, low-light amplifier)
|
- TAB: toggle augmented reality overlay (HUD, low-light amplifier)
|
||||||
|
|
||||||
Cheats:
|
Cheats:
|
||||||
|
|
||||||
- v/b: Impossible acceleration forward/backward
|
- V/B: Impossible acceleration forward/backward
|
||||||
- Shift+v/b: Same as v/b, but a thousand times faster
|
- Shift+V/B: Same as V/B, but a thousand times faster
|
||||||
- c: Impossible instant stopping
|
- C: Impossible instant stopping
|
||||||
|
|
||||||
# System Requirements
|
# System Requirements
|
||||||
|
|
||||||
|
|
|
@ -233,7 +233,7 @@ fn apply_input_to_player(
|
||||||
}
|
}
|
||||||
v.0 += acceleration_total;
|
v.0 += acceleration_total;
|
||||||
engine.current_warmup = (engine.current_warmup + dt / engine.warmup_seconds).clamp(0.0, 1.0);
|
engine.current_warmup = (engine.current_warmup + dt / engine.warmup_seconds).clamp(0.0, 1.0);
|
||||||
play_thruster_sound = !settings.mute_sfx;
|
play_thruster_sound = true;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
engine.current_warmup = (engine.current_warmup - dt / engine.warmup_seconds).clamp(0.0, 1.0);
|
engine.current_warmup = (engine.current_warmup - dt / engine.warmup_seconds).clamp(0.0, 1.0);
|
||||||
|
@ -298,7 +298,7 @@ fn apply_input_to_player(
|
||||||
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 {
|
if play_reactionwheel_sound && !settings.mute_sfx {
|
||||||
sink.set_volume((volume + action).clamp(0.0, 1.0));
|
sink.set_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()
|
||||||
|
@ -312,21 +312,21 @@ fn apply_input_to_player(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if let Ok(sink) = thruster_sound_controller.get_single() {
|
if let Ok(sink) = thruster_sound_controller.get_single() {
|
||||||
if play_thruster_sound && engine.engine_type == actor::EngineType::Monopropellant {
|
if play_thruster_sound && !settings.mute_sfx && engine.engine_type == actor::EngineType::Monopropellant {
|
||||||
sink.play()
|
sink.play()
|
||||||
} else {
|
} else {
|
||||||
sink.pause()
|
sink.pause()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if let Ok(sink) = rocket_sound_controller.get_single() {
|
if let Ok(sink) = rocket_sound_controller.get_single() {
|
||||||
if play_thruster_sound && engine.engine_type == actor::EngineType::Rocket {
|
if play_thruster_sound && !settings.mute_sfx && engine.engine_type == actor::EngineType::Rocket {
|
||||||
sink.play()
|
sink.play()
|
||||||
} else {
|
} else {
|
||||||
sink.pause()
|
sink.pause()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if let Ok(sink) = ion_sound_controller.get_single() {
|
if let Ok(sink) = ion_sound_controller.get_single() {
|
||||||
if play_thruster_sound && engine.engine_type == actor::EngineType::Ion {
|
if play_thruster_sound && !settings.mute_sfx && engine.engine_type == actor::EngineType::Ion {
|
||||||
sink.play()
|
sink.play()
|
||||||
} else {
|
} else {
|
||||||
sink.pause()
|
sink.pause()
|
||||||
|
|
Loading…
Reference in a new issue