Merge pull request #475 from Citadel-Station-13/upstream-merge-26334

[MIRROR] Fixes ghosts not hearing whispers with the toggle on
This commit is contained in:
LetterJay
2017-04-19 18:33:56 -05:00
committed by GitHub
+11 -3
View File
@@ -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