From 212f62fbc65ff17c16d93515a84ffc6516d9afc5 Mon Sep 17 00:00:00 2001 From: yuni Date: Thu, 3 Oct 2024 06:08:20 +0200 Subject: [PATCH] mute suffocation sound when sfx is muted --- src/audio.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/audio.rs b/src/audio.rs index 40f7cb1..1311b24 100644 --- a/src/audio.rs +++ b/src/audio.rs @@ -278,7 +278,11 @@ pub fn play_gasp_sfx( continue; } if suit.oxygen <= 0.0 && !settings.god_mode { - sink.set_volume(0.6); + if settings.mute_sfx { + sink.set_volume(0.0); + } else { + sink.set_volume(0.6); + } sink.play(); } else { if !sink.is_paused() {