From cdc63b90b28e34461ccb0aa573f82069a2015587 Mon Sep 17 00:00:00 2001 From: Luc <89928798+lewcc@users.noreply.github.com> Date: Thu, 23 Jun 2022 03:42:21 -0700 Subject: [PATCH] Fix age based emotes (#18053) --- code/datums/emote.dm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/code/datums/emote.dm b/code/datums/emote.dm index 13c9a836b22..4ae68200ed3 100644 --- a/code/datums/emote.dm +++ b/code/datums/emote.dm @@ -249,6 +249,7 @@ /** * Play the sound effect in an emote. * If you want to change the way the playsound call works, override this. + * Note! If you want age_based to work, you need to force vary to TRUE. * * user - The user of the emote. * * intentional - Whether or not the emote was triggered intentionally. * * sound_path - Filesystem path to the audio clip to play. @@ -257,7 +258,8 @@ /datum/emote/proc/play_sound_effect(mob/user, intentional, sound_path, sound_volume) if(age_based && ishuman(user)) var/mob/living/carbon/human/H = user - playsound(user.loc, sound_path, sound_volume, vary, frequency = H.get_age_pitch()) + // Vary needs to be true as otherwise frequency changes get ignored deep within playsound_local :( + playsound(user.loc, sound_path, sound_volume, TRUE, frequency = H.get_age_pitch()) else playsound(user.loc, sound_path, sound_volume, vary)