From 7c008e61e16693330d9181f512408e9bb81d199a Mon Sep 17 00:00:00 2001 From: uporotiy Date: Sat, 6 Nov 2010 18:16:57 +0000 Subject: [PATCH] -Fixed midis not playing at all. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@377 316c924e-a436-60f5-8080-3fe189b3f50e --- code/modules/admin/verbs/playsound.dm | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/code/modules/admin/verbs/playsound.dm b/code/modules/admin/verbs/playsound.dm index 7c481499d2c..e398d90a4f2 100644 --- a/code/modules/admin/verbs/playsound.dm +++ b/code/modules/admin/verbs/playsound.dm @@ -15,16 +15,18 @@ log_admin("[key_name(src)] played sound [S]") message_admins("[key_name_admin(src)] played sound [S]", 1) for(var/mob/M in world) - if(M.client.midis) - M << uploaded_sound + if(M.client) + if(M.client.midis) + M << uploaded_sound else if(usr.client.canplaysound) usr.client.canplaysound = 0 log_admin("[key_name(src)] played sound [S]") message_admins("[key_name_admin(src)] played sound [S]", 1) for(var/mob/M in world) - if(M.client.midis) - M << uploaded_sound + if(M.client) + if(M.client.midis) + M << uploaded_sound else usr << "You already used up your jukebox monies this round!" del(uploaded_sound) @@ -43,8 +45,9 @@ message_admins("[key_name_admin(usr)] has declared Cuban Pete Time!", 1) for(var/mob/M in world) - if(M.client.midis) - M << 'cubanpetetime.ogg' + if(M.client) + if(M.client.midis) + M << 'cubanpetetime.ogg' for(var/mob/living/carbon/human/CP in world) if(CP.real_name=="Cuban Pete" && CP.key!="Rosham")