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.
This commit is contained in:
Ccomp5950
2014-02-14 12:03:52 +01:00
committed by alex-gh
parent 39bfcc1e7a
commit 0b7e70a293
+4 -3
View File
@@ -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()