From f583200b1300fe3a6e10bb701691cc9d14cabdb5 Mon Sep 17 00:00:00 2001 From: yuni Date: Thu, 3 Oct 2024 06:03:55 +0200 Subject: [PATCH] don't play suffocation sound in god mode --- src/audio.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/audio.rs b/src/audio.rs index 10223ca..40f7cb1 100644 --- a/src/audio.rs +++ b/src/audio.rs @@ -267,6 +267,7 @@ pub fn play_zoom_sfx( } pub fn play_gasp_sfx( + settings: Res, player: Query<&actor::Suit, With>, mut ew_sfx: EventWriter, q_audiosinks: Query<(&audio::Sfx, &AudioSink)>, @@ -276,7 +277,7 @@ pub fn play_gasp_sfx( if *sfxtype != Sfx::Gasp { continue; } - if suit.oxygen <= 0.0 { + if suit.oxygen <= 0.0 && !settings.god_mode { sink.set_volume(0.6); sink.play(); } else {