Merge pull request #10964 from caelaislinn/telecomms_fix

Fixes an obscure runtime in telecomms code
This commit is contained in:
Zuhayr
2015-09-01 13:56:41 +09:30

View File

@@ -287,14 +287,18 @@ var/message_delay = 0 // To make sure restarting the recentmessages list is kept
/* --- Loop through the receivers and categorize them --- */ /* --- Loop through the receivers and categorize them --- */
if (R.client && !(R.client.prefs.toggles & CHAT_RADIO)) //Adminning with 80 people on can be fun when you're trying to talk and all you can hear is radios. if (R.client)
continue if(R.client.prefs)
if(!(R.client.prefs.toggles & CHAT_RADIO)) //Adminning with 80 people on can be fun when you're trying to talk and all you can hear is radios.
continue
else
log_debug("Client prefs found to be null in /proc/Broadcast_Message() for mob [R] and client [R.ckey], this should be investigated.")
if(istype(R, /mob/new_player)) // we don't want new players to hear messages. rare but generates runtimes. if(istype(R, /mob/new_player)) // we don't want new players to hear messages. rare but generates runtimes.
continue continue
// Ghosts hearing all radio chat don't want to hear syndicate intercepts, they're duplicates // Ghosts hearing all radio chat don't want to hear syndicate intercepts, they're duplicates
if(data == 3 && istype(R, /mob/dead/observer) && R.client && (R.client.prefs.toggles & CHAT_GHOSTRADIO)) if(data == 3 && istype(R, /mob/dead/observer) && R.client && R.client.prefs && (R.client.prefs.toggles & CHAT_GHOSTRADIO))
continue continue
// --- Check for compression --- // --- Check for compression ---
@@ -490,8 +494,12 @@ var/message_delay = 0 // To make sure restarting the recentmessages list is kept
/* --- Loop through the receivers and categorize them --- */ /* --- Loop through the receivers and categorize them --- */
if (R.client && !(R.client.prefs.toggles & CHAT_RADIO)) //Adminning with 80 people on can be fun when you're trying to talk and all you can hear is radios. if (R.client)
continue if(R.client.prefs)
if(!(R.client.prefs.toggles & CHAT_RADIO)) //Adminning with 80 people on can be fun when you're trying to talk and all you can hear is radios.
continue
else
log_debug("Client prefs found to be null in /proc/Broadcast_SimpleMessage() for mob [R] and client [R.ckey], this should be investigated.")
// --- Check for compression --- // --- Check for compression ---