add car door sounds when entering/exiting vehicles
This commit is contained in:
parent
83ab703ea9
commit
fa9f1096cd
|
@ -45,6 +45,7 @@
|
||||||
- zoom.ogg: Recorded a screw thread scraping against a saxophone ligature
|
- zoom.ogg: Recorded a screw thread scraping against a saxophone ligature
|
||||||
- Other sounds:
|
- Other sounds:
|
||||||
- achieve.ogg: UI Completed Status Alert Notification SFX001.wav [by Headphaze, CC BY 4.0](https://freesound.org/s/277033/)
|
- achieve.ogg: UI Completed Status Alert Notification SFX001.wav [by Headphaze, CC BY 4.0](https://freesound.org/s/277033/)
|
||||||
|
- enter.ogg, exit.ogg: [Getting Out of Car.wav by kingsrow, CC0](https://freesound.org/s/181568/)
|
||||||
- Takeoff.ogg: [By Serat, CC BY 4.0](https://freemusicarchive.org/music/serat/route-remastered/takeoff-remastered/)
|
- Takeoff.ogg: [By Serat, CC BY 4.0](https://freemusicarchive.org/music/serat/route-remastered/takeoff-remastered/)
|
||||||
- JupiterRecording.ogg: An [actual Jupiter recording by NASA](https://archive.org/download/voyager-1-and-2-1990-jupiter-nasa-voyager-space-sounds-electronic), public domain.
|
- JupiterRecording.ogg: An [actual Jupiter recording by NASA](https://archive.org/download/voyager-1-and-2-1990-jupiter-nasa-voyager-space-sounds-electronic), public domain.
|
||||||
- Processed by cutting out min 1:47-3:47 and applying a 10s linear crossfade at the end. Exported as ogg with quality=3, see [.kdenlive file](src/audio/JupiterRecording.kdenlive).
|
- Processed by cutting out min 1:47-3:47 and applying a 10s linear crossfade at the end. Exported as ogg with quality=3, see [.kdenlive file](src/audio/JupiterRecording.kdenlive).
|
||||||
|
|
BIN
assets/sounds/enter.ogg
Normal file
BIN
assets/sounds/enter.ogg
Normal file
Binary file not shown.
BIN
assets/sounds/exit.ogg
Normal file
BIN
assets/sounds/exit.ogg
Normal file
Binary file not shown.
|
@ -495,7 +495,7 @@ pub fn handle_vehicle_enter_exit(
|
||||||
flashlight_trans.translation = Vec3::new(0.0, 0.0, 1.0);
|
flashlight_trans.translation = Vec3::new(0.0, 0.0, 1.0);
|
||||||
}
|
}
|
||||||
commands.entity(driver).insert(RigidBody::Dynamic);
|
commands.entity(driver).insert(RigidBody::Dynamic);
|
||||||
ew_sfx.send(audio::PlaySfxEvent(audio::Sfx::Switch));
|
ew_sfx.send(audio::PlaySfxEvent(audio::Sfx::ExitVehicle));
|
||||||
commands.entity(vehicle).remove::<PlayerCamera>();
|
commands.entity(vehicle).remove::<PlayerCamera>();
|
||||||
commands.entity(driver).insert(PlayerCamera);
|
commands.entity(driver).insert(PlayerCamera);
|
||||||
commands.entity(vehicle).remove::<PlayerDrivesThis>();
|
commands.entity(vehicle).remove::<PlayerDrivesThis>();
|
||||||
|
|
|
@ -70,7 +70,9 @@ const PATHS: &[(SfxType, Sfx, &str)] = &[
|
||||||
(SfxType::OneOff, Sfx::Click, "sounds/click.ogg"),
|
(SfxType::OneOff, Sfx::Click, "sounds/click.ogg"),
|
||||||
(SfxType::OneOff, Sfx::Connect, "sounds/connect.ogg"),
|
(SfxType::OneOff, Sfx::Connect, "sounds/connect.ogg"),
|
||||||
(SfxType::OneOff, Sfx::Crash, "sounds/crash.ogg"),
|
(SfxType::OneOff, Sfx::Crash, "sounds/crash.ogg"),
|
||||||
(SfxType::OneOff, Sfx::EnterVehicle, "sounds/growl.ogg"),
|
(SfxType::OneOff, Sfx::EnterVehicle, "sounds/enter.ogg"),
|
||||||
|
(SfxType::OneOff, Sfx::ExitVehicle, "sounds/exit.ogg"),
|
||||||
|
(SfxType::OneOff, Sfx::Honk, "sounds/growl.ogg"),
|
||||||
(
|
(
|
||||||
SfxType::OneOff,
|
SfxType::OneOff,
|
||||||
Sfx::IncomingChatMessage,
|
Sfx::IncomingChatMessage,
|
||||||
|
@ -94,8 +96,10 @@ pub enum Sfx {
|
||||||
Crash,
|
Crash,
|
||||||
ElectricMotor,
|
ElectricMotor,
|
||||||
EnterVehicle,
|
EnterVehicle,
|
||||||
|
ExitVehicle,
|
||||||
Gasp,
|
Gasp,
|
||||||
GaspRelief,
|
GaspRelief,
|
||||||
|
Honk,
|
||||||
IncomingChatMessage,
|
IncomingChatMessage,
|
||||||
Ion,
|
Ion,
|
||||||
Ping,
|
Ping,
|
||||||
|
@ -111,6 +115,9 @@ pub fn str2sfx(sfx_label: &str) -> Sfx {
|
||||||
return match sfx_label {
|
return match sfx_label {
|
||||||
"achieve" => Sfx::Achieve,
|
"achieve" => Sfx::Achieve,
|
||||||
"switch" => Sfx::Switch,
|
"switch" => Sfx::Switch,
|
||||||
|
"enter" => Sfx::EnterVehicle,
|
||||||
|
"exit" => Sfx::ExitVehicle,
|
||||||
|
"honk" => Sfx::Honk,
|
||||||
"click" => Sfx::Click,
|
"click" => Sfx::Click,
|
||||||
"woosh" => Sfx::Woosh,
|
"woosh" => Sfx::Woosh,
|
||||||
"zoom" => Sfx::Zoom,
|
"zoom" => Sfx::Zoom,
|
||||||
|
|
|
@ -361,7 +361,10 @@ fn handle_cheats(
|
||||||
if key_input.just_pressed(settings.key_cheat_god_mode) {
|
if key_input.just_pressed(settings.key_cheat_god_mode) {
|
||||||
settings.god_mode ^= true;
|
settings.god_mode ^= true;
|
||||||
if settings.god_mode {
|
if settings.god_mode {
|
||||||
ew_sfx.send(audio::PlaySfxEvent(audio::Sfx::EnterVehicle));
|
ew_sfx.send(audio::PlaySfxEvent(audio::Sfx::Honk));
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
ew_sfx.send(audio::PlaySfxEvent(audio::Sfx::Switch));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if !settings.god_mode && !settings.dev_mode {
|
if !settings.god_mode && !settings.dev_mode {
|
||||||
|
|
Loading…
Reference in a new issue