mute suffocation sound when sfx is muted

This commit is contained in:
yuni 2024-10-03 06:08:20 +02:00
parent f583200b13
commit 212f62fbc6

View file

@ -278,7 +278,11 @@ pub fn play_gasp_sfx(
continue; continue;
} }
if suit.oxygen <= 0.0 && !settings.god_mode { 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(); sink.play();
} else { } else {
if !sink.is_paused() { if !sink.is_paused() {