From ef3a10950af1deba9a63ecf041b7460f5cc27955 Mon Sep 17 00:00:00 2001 From: Miauw Date: Sun, 1 Feb 2015 12:37:49 +0100 Subject: [PATCH 1/2] Fixes saycode breaking when the ckey of a ghost was set to null. --- code/modules/mob/living/carbon/brain/emote.dm | 2 +- code/modules/mob/living/carbon/emote.dm | 2 +- code/modules/mob/living/carbon/human/emote.dm | 2 +- code/modules/mob/living/carbon/human/whisper.dm | 2 +- code/modules/mob/living/emote.dm | 2 +- code/modules/mob/living/say.dm | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/code/modules/mob/living/carbon/brain/emote.dm b/code/modules/mob/living/carbon/brain/emote.dm index 4c1f2e55271..6c7b938288f 100644 --- a/code/modules/mob/living/carbon/brain/emote.dm +++ b/code/modules/mob/living/carbon/brain/emote.dm @@ -62,7 +62,7 @@ for(var/mob/M in dead_mob_list) if (!M.client || istype(M, /mob/new_player)) continue //skip monkeys, leavers, and new_players - if(M.stat == DEAD && (M.client.prefs.toggles & CHAT_GHOSTSIGHT) && !(M in viewers(src,null))) + if(M.stat == DEAD && (M.client && (M.client.prefs.toggles & CHAT_GHOSTSIGHT)) && !(M in viewers(src,null))) M.show_message(message) diff --git a/code/modules/mob/living/carbon/emote.dm b/code/modules/mob/living/carbon/emote.dm index a67f683174c..7f402cddbf9 100644 --- a/code/modules/mob/living/carbon/emote.dm +++ b/code/modules/mob/living/carbon/emote.dm @@ -188,7 +188,7 @@ for(var/mob/M in dead_mob_list) if(!M.client || istype(M, /mob/new_player)) continue //skip monkeys, leavers and new players - if(M.stat == DEAD && (M.client.prefs.toggles & CHAT_GHOSTSIGHT) && !(M in viewers(src,null))) + if(M.stat == DEAD && (M.client && M.client.prefs.toggles & CHAT_GHOSTSIGHT)) && !(M in viewers(src,null))) M.show_message(message) diff --git a/code/modules/mob/living/carbon/human/emote.dm b/code/modules/mob/living/carbon/human/emote.dm index 53eaa53884f..4846abc0eb7 100644 --- a/code/modules/mob/living/carbon/human/emote.dm +++ b/code/modules/mob/living/carbon/human/emote.dm @@ -322,7 +322,7 @@ for(var/mob/M in dead_mob_list) if(!M.client || istype(M, /mob/new_player)) continue //skip monkeys, leavers and new players - if(M.stat == DEAD && (M.client.prefs.toggles & CHAT_GHOSTSIGHT) && !(M in viewers(src,null))) + if(M.stat == DEAD && M.client && (M.client.prefs.toggles & CHAT_GHOSTSIGHT) && !(M in viewers(src,null))) M.show_message(message) diff --git a/code/modules/mob/living/carbon/human/whisper.dm b/code/modules/mob/living/carbon/human/whisper.dm index 77be26fc621..b7df925da57 100644 --- a/code/modules/mob/living/carbon/human/whisper.dm +++ b/code/modules/mob/living/carbon/human/whisper.dm @@ -46,7 +46,7 @@ var/list/listening_dead = list() for(var/mob/M in player_list) - if(M.stat == DEAD && ((M.client.prefs.toggles & CHAT_GHOSTWHISPER) || (get_dist(M, src) <= 7))) + if(M.stat == DEAD && M.client && ((M.client.prefs.toggles & CHAT_GHOSTWHISPER) || (get_dist(M, src) <= 7))) listening_dead |= M var/list/listening = get_hearers_in_view(1, src) diff --git a/code/modules/mob/living/emote.dm b/code/modules/mob/living/emote.dm index 9adb0fd4188..891fae0abeb 100644 --- a/code/modules/mob/living/emote.dm +++ b/code/modules/mob/living/emote.dm @@ -268,7 +268,7 @@ if(!M.client || istype(M, /mob/new_player)) continue //skip monkeys, leavers and new players var/T = get_turf(src) - if(M.stat == DEAD && (M.client.prefs.toggles & CHAT_GHOSTSIGHT) && !(M in viewers(T,null))) + if(M.stat == DEAD && M.client && (M.client.prefs.toggles & CHAT_GHOSTSIGHT) && !(M in viewers(T,null))) M.show_message(message) diff --git a/code/modules/mob/living/say.dm b/code/modules/mob/living/say.dm index dd3745d4245..f94e95160da 100644 --- a/code/modules/mob/living/say.dm +++ b/code/modules/mob/living/say.dm @@ -161,7 +161,7 @@ var/list/department_radio_keys = list( var/list/listening = get_hearers_in_view(message_range, source) var/list/listening_dead = list() for(var/mob/M in player_list) - if(M.stat == DEAD && ((M.client.prefs.toggles & CHAT_GHOSTEARS) || (get_dist(M, src) <= 7))&& client) // client is so that ghosts don't have to listen to mice + if(M.stat == DEAD && M.client && ((M.client.prefs.toggles & CHAT_GHOSTEARS) || (get_dist(M, src) <= 7)) && client) // client is so that ghosts don't have to listen to mice listening_dead |= M listening -= listening_dead //so ghosts dont hear stuff twice From ffa0a81ecfe46f1c87b25dc320adbef577d15fde Mon Sep 17 00:00:00 2001 From: Miauw Date: Sun, 1 Feb 2015 12:44:22 +0100 Subject: [PATCH 2/2] gotta go fast --- code/modules/mob/living/carbon/emote.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/mob/living/carbon/emote.dm b/code/modules/mob/living/carbon/emote.dm index 7f402cddbf9..0c9893c0d39 100644 --- a/code/modules/mob/living/carbon/emote.dm +++ b/code/modules/mob/living/carbon/emote.dm @@ -188,7 +188,7 @@ for(var/mob/M in dead_mob_list) if(!M.client || istype(M, /mob/new_player)) continue //skip monkeys, leavers and new players - if(M.stat == DEAD && (M.client && M.client.prefs.toggles & CHAT_GHOSTSIGHT)) && !(M in viewers(src,null))) + if(M.stat == DEAD && M.client && (M.client.prefs.toggles & CHAT_GHOSTSIGHT) && !(M in viewers(src,null))) M.show_message(message)