From e250959bc70de0f3f267acd4c00caa299acda3a2 Mon Sep 17 00:00:00 2001 From: matttheficus <57759731+matttheficus@users.noreply.github.com> Date: Sat, 22 Apr 2023 03:27:45 -0400 Subject: [PATCH] Tweaks Gasping and Deathgasp Range + Reduces Gasp Volume with Oxyloss (#20753) * -20db supressor * garrote 7 range + wall block * deathgasp 9 + scaling gasp volume with oxyloss * Revert "garrote 7 range + wall block" This reverts commit 0e9e8de5ef7a0445bad426ca0e65297dd8ed8c21. * Revert "-20db supressor" This reverts commit f29e4558c29c681c671653d861c579e8adddb0b9. --- .../mob/living/carbon/human/human_emote.dm | 16 +++++++++++++++- code/modules/mob/living/living_emote.dm | 2 +- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/code/modules/mob/living/carbon/human/human_emote.dm b/code/modules/mob/living/carbon/human/human_emote.dm index 1de8e23cf0a..54aec1862e7 100644 --- a/code/modules/mob/living/carbon/human/human_emote.dm +++ b/code/modules/mob/living/carbon/human/human_emote.dm @@ -152,8 +152,22 @@ /datum/emote/living/carbon/human/gasp/play_sound_effect(mob/user, intentional, sound_path, sound_volume) var/mob/living/carbon/human/H = user + var/oxy = H.getOxyLoss() + var/volume_decrease = 0 + switch(oxy) + if(0 to 50) + volume_decrease = 0 + if(51 to 100) + volume_decrease = 50 + if(101 to 150) + volume_decrease = 65 + if(151 to 200) + volume_decrease = 80 + else + volume_decrease = 95 + sound_volume -= volume_decrease // special handling here: we don't want monkeys' gasps to sound through walls so you can actually walk past xenobio - playsound(user.loc, sound_path, sound_volume, TRUE, frequency = H.get_age_pitch(), ignore_walls = !isnull(user.mind)) + playsound(user.loc, sound_path, sound_volume, TRUE, -10, frequency = H.get_age_pitch(), ignore_walls = !isnull(user.mind)) /datum/emote/living/carbon/human/shake key = "shake" diff --git a/code/modules/mob/living/living_emote.dm b/code/modules/mob/living/living_emote.dm index 963ad699dd7..61540fb7601 100644 --- a/code/modules/mob/living/living_emote.dm +++ b/code/modules/mob/living/living_emote.dm @@ -120,7 +120,7 @@ if(!istype(H)) return ..() // special handling here: we don't want monkeys' gasps to sound through walls so you can actually walk past xenobio - playsound(user.loc, sound_path, sound_volume, TRUE, frequency = H.get_age_pitch(), ignore_walls = !isnull(user.mind)) + playsound(user.loc, sound_path, sound_volume, TRUE, -8, frequency = H.get_age_pitch(), ignore_walls = !isnull(user.mind)) /datum/emote/living/drool key = "drool"