From 348685d97c7138ef79ddeb2ef46d358aa2be72c5 Mon Sep 17 00:00:00 2001 From: "giacomand@gmail.com" Date: Sat, 25 Aug 2012 18:10:19 +0000 Subject: [PATCH] -AI camera light now properly works with AI freelook. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4539 316c924e-a436-60f5-8080-3fe189b3f50e --- code/modules/mob/living/silicon/ai/ai.dm | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm index c4ccaad779..fc7578f80a 100644 --- a/code/modules/mob/living/silicon/ai/ai.dm +++ b/code/modules/mob/living/silicon/ai/ai.dm @@ -649,24 +649,20 @@ // Handled camera lighting, when toggled. -// It will get the nearest camera via range, it wouldn't matter +// It will get the nearest camera from the eyeobj, lighting it. -/mob/living/silicon/ai/proc/lightNearbyCamera(var/lum) +/mob/living/silicon/ai/proc/lightNearbyCamera() if(camera_light_on && camera_light_on < world.timeofday) if(src.current) - // I have to use range instead of view or the darkness gets in the way. var/camera = near_range_camera(src.eyeobj) if(camera && src.current != camera) src.current.SetLuminosity(0) src.current = camera - src.current.SetLuminosity(lum) + src.current.SetLuminosity(AI_CAMERA_LUMINOSITY) else if(isnull(camera)) src.current.SetLuminosity(0) src.current = null - camera_light_on = world.timeofday + 1 * 10 // Update the light every 2 seconds. + camera_light_on = world.timeofday + 1 * 20 // Update the light every 2 seconds. else src.current = near_range_camera(src.eyeobj) - if(src.current) src.current.SetLuminosity(lum) - - -#undef AI_CAMERA_LUMINOSITY \ No newline at end of file + if(src.current) src.current.SetLuminosity(AI_CAMERA_LUMINOSITY)