mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-13 11:43:31 +00:00
-AI camera light now properly works with AI freelook.
git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4539 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -649,24 +649,20 @@
|
|||||||
|
|
||||||
|
|
||||||
// Handled camera lighting, when toggled.
|
// 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(camera_light_on && camera_light_on < world.timeofday)
|
||||||
if(src.current)
|
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)
|
var/camera = near_range_camera(src.eyeobj)
|
||||||
if(camera && src.current != camera)
|
if(camera && src.current != camera)
|
||||||
src.current.SetLuminosity(0)
|
src.current.SetLuminosity(0)
|
||||||
src.current = camera
|
src.current = camera
|
||||||
src.current.SetLuminosity(lum)
|
src.current.SetLuminosity(AI_CAMERA_LUMINOSITY)
|
||||||
else if(isnull(camera))
|
else if(isnull(camera))
|
||||||
src.current.SetLuminosity(0)
|
src.current.SetLuminosity(0)
|
||||||
src.current = null
|
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
|
else
|
||||||
src.current = near_range_camera(src.eyeobj)
|
src.current = near_range_camera(src.eyeobj)
|
||||||
if(src.current) src.current.SetLuminosity(lum)
|
if(src.current) src.current.SetLuminosity(AI_CAMERA_LUMINOSITY)
|
||||||
|
|
||||||
|
|
||||||
#undef AI_CAMERA_LUMINOSITY
|
|
||||||
|
|||||||
Reference in New Issue
Block a user