From 0b7e70a293fbd7161e0381365d4c77e717c25eba Mon Sep 17 00:00:00 2001 From: Ccomp5950 Date: Tue, 11 Feb 2014 03:20:22 -0600 Subject: [PATCH] Bugfix: AI Camera light toggle Fixes #3676 Before: Toggling would get stuck where it wouldn't toggle the camera until you reset your view. After: Camera light toggles, you have to toggle off before turning on a new camera light though. --- code/modules/mob/living/silicon/ai/ai.dm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm index b2daab5bca5..a7b4daf78bb 100644 --- a/code/modules/mob/living/silicon/ai/ai.dm +++ b/code/modules/mob/living/silicon/ai/ai.dm @@ -692,10 +692,11 @@ var/list/ai_list = list() camera_light_on = !camera_light_on src << "Camera lights [camera_light_on ? "activated" : "deactivated"]." if(!camera_light_on) - if(src.current) - src.current.SetLuminosity(0) + if(current) + current.SetLuminosity(0) + current = null else - src.lightNearbyCamera() + lightNearbyCamera()