diff --git a/code/datums/emotes.dm b/code/datums/emotes.dm index a871f217802..d05c9e4a814 100644 --- a/code/datums/emotes.dm +++ b/code/datums/emotes.dm @@ -114,11 +114,12 @@ playsound(user, tmp_sound, 50, vary) var/user_turf = get_turf(user) - for(var/mob/ghost in GLOB.dead_mob_list) - if(!ghost.client || isnewplayer(ghost)) - continue - if(ghost.stat == DEAD && ghost.client && user.client && (ghost.client.prefs.chat_toggles & CHAT_GHOSTSIGHT) && !(ghost in viewers(user_turf, null))) - ghost.show_message("[FOLLOW_LINK(ghost, user)] [dchatmsg]") + if (user.client) + for(var/mob/ghost as anything in GLOB.dead_mob_list) + if(!ghost.client || isnewplayer(ghost)) + continue + if(ghost.client.prefs.chat_toggles & CHAT_GHOSTSIGHT && !(ghost in viewers(user_turf, null))) + ghost.show_message("[FOLLOW_LINK(ghost, user)] [dchatmsg]") if(emote_type == EMOTE_AUDIBLE) user.audible_message(msg, deaf_message = "You see how [user] [msg]", audible_message_flags = EMOTE_MESSAGE) @@ -283,10 +284,11 @@ var/ghost_text = "[src] [text]" var/origin_turf = get_turf(src) - for(var/mob/ghost in GLOB.dead_mob_list) - if(!ghost.client || isnewplayer(ghost)) - continue - if(ghost.stat == DEAD && ghost.client && (ghost.client.prefs.chat_toggles & CHAT_GHOSTSIGHT) && !(ghost in viewers(origin_turf, null))) - ghost.show_message("[FOLLOW_LINK(ghost, src)] [ghost_text]") + if(client) + for(var/mob/ghost as anything in GLOB.dead_mob_list) + if(!ghost.client || isnewplayer(ghost)) + continue + if(ghost.client.prefs.chat_toggles & CHAT_GHOSTSIGHT && !(ghost in viewers(origin_turf, null))) + ghost.show_message("[FOLLOW_LINK(ghost, src)] [ghost_text]") visible_message(text, visible_message_flags = EMOTE_MESSAGE)