Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes saycode breaking when the ckey of a ghost was set to null. #7490

Merged
merged 2 commits into from
Feb 5, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion code/modules/mob/living/carbon/brain/emote.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)


Expand Down
2 changes: 1 addition & 1 deletion code/modules/mob/living/carbon/emote.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)


Expand Down
2 changes: 1 addition & 1 deletion code/modules/mob/living/carbon/human/emote.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)


Expand Down
2 changes: 1 addition & 1 deletion code/modules/mob/living/carbon/human/whisper.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion code/modules/mob/living/emote.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)


Expand Down
2 changes: 1 addition & 1 deletion code/modules/mob/living/say.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down