From 81ad880f5492c42acb5fe54a6de227cdf5032be6 Mon Sep 17 00:00:00 2001 From: CitadelStationBot Date: Wed, 19 Apr 2017 04:33:54 -0500 Subject: [PATCH] Fixes ghosts not hearing whispers with the toggle on --- code/modules/mob/living/say.dm | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/code/modules/mob/living/say.dm b/code/modules/mob/living/say.dm index f0e39189af..0c50603a92 100644 --- a/code/modules/mob/living/say.dm +++ b/code/modules/mob/living/say.dm @@ -228,9 +228,17 @@ GLOBAL_LIST_INIT(department_radio_keys, list( var/list/the_dead = list() for(var/_M in GLOB.player_list) var/mob/M = _M - if(M.stat == DEAD && M.client && ((M.client.prefs.chat_toggles & CHAT_GHOSTEARS) || (get_dist(M, src) <= 7 && M.z == z)) && client) // client is so that ghosts don't have to listen to mice - listening |= M - the_dead[M] = TRUE + if(M.stat != DEAD) //not dead, not important + continue + if(!M.client || !client) //client is so that ghosts don't have to listen to mice + continue + if(get_dist(M, src) > 7 || M.z != z) //they're out of range of normal hearing + if(eavesdropping_modes[message_mode] && !(M.client.prefs.chat_toggles & CHAT_GHOSTWHISPER)) //they're whispering and we have hearing whispers at any range off + continue + if(!(M.client.prefs.chat_toggles & CHAT_GHOSTEARS)) //they're talking normally and we have hearing at any range off + continue + listening |= M + the_dead[M] = TRUE var/eavesdropping var/eavesrendered