Ensure emotes are only routed to the user (#18285)

This commit is contained in:
Luc
2022-07-09 07:07:58 -07:00
committed by GitHub
parent b96943d269
commit 34e8f36327
+7
View File
@@ -95,6 +95,13 @@
if(client.prefs.toggles & PREFTOGGLE_CHAT_GHOSTEARS && (speaker in view(src)))
message = "<b>[message]</b>"
// Ensure only the speaker is forced to emote, and that the spoken language is inname
if(speaker == src)
for(var/datum/multilingual_say_piece/SP in message_pieces)
if(SP.speaking && SP.speaking.flags & INNATE)
custom_emote(EMOTE_AUDIBLE, message_clean, TRUE)
return
if(!can_hear())
// INNATE is the flag for audible-emote-language, so we don't want to show an "x talks but you cannot hear them" message if it's set
// if(!language || !(language.flags & INNATE))