From 07d38a6515f291bbe164bf43b1b42c07c5bcb72e Mon Sep 17 00:00:00 2001 From: Menshin Date: Sat, 17 Jan 2015 21:02:29 +0100 Subject: [PATCH] Fixes runtime related to handle_vision for clientless mobs --- code/modules/mob/living/carbon/human/species.dm | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/code/modules/mob/living/carbon/human/species.dm b/code/modules/mob/living/carbon/human/species.dm index c55d0783b7c..9fa5039f024 100644 --- a/code/modules/mob/living/carbon/human/species.dm +++ b/code/modules/mob/living/carbon/human/species.dm @@ -498,15 +498,17 @@ if(H.tinttotal >= TINT_IMPAIR) if(tinted_weldhelh) if(H.tinttotal >= TINT_BLIND) - H.eye_blind = max(H.eye_blind, 1) // You get the sudden urge to learn to play keyboard - H.client.screen += global_hud.darkMask - else + H.eye_blind = max(H.eye_blind, 1) + if(H.client) H.client.screen += global_hud.darkMask if(H.blind) if(H.eye_blind) H.blind.layer = 18 else H.blind.layer = 0 + if(!H.client)//no client, no screen to update + return 1 + if( H.disabilities & NEARSIGHT && !istype(H.glasses, /obj/item/clothing/glasses/regular) ) H.client.screen += global_hud.vimpaired if(H.eye_blurry) H.client.screen += global_hud.blurry