fix collision sfx while in vehicles

This commit is contained in:
yuni 2024-03-30 18:04:57 +01:00
parent af2f43b9f9
commit b590c4de44

View file

@ -563,7 +563,7 @@ pub fn handle_chat_scripts(
fn handle_collisions( fn handle_collisions(
mut collision_event_reader: EventReader<Collision>, mut collision_event_reader: EventReader<Collision>,
mut ew_sfx: EventWriter<audio::PlaySfxEvent>, mut ew_sfx: EventWriter<audio::PlaySfxEvent>,
q_player: Query<Entity, With<Player>>, q_player: Query<Entity, With<PlayerCamera>>,
) { ) {
if let Ok(player) = q_player.get_single() { if let Ok(player) = q_player.get_single() {
for Collision(contacts) in collision_event_reader.read() { for Collision(contacts) in collision_event_reader.read() {