Fixes AI's trying to light up cameras in areas with no cameras (#75302)

This check is present throughout cameranet code as chunk camera lists
can be empty lists by design, it was just missing for the AI camera
light-up proc since that's in a separate area.
This commit is contained in:
ShizCalev
2023-05-10 14:06:08 -05:00
committed by GitHub
parent fef3485a0f
commit 9a93d13bee
+1 -1
View File
@@ -783,7 +783,7 @@
for (var/datum/camerachunk/chunk as anything in eyeobj.visibleCameraChunks)
for (var/z_key in chunk.cameras)
for(var/obj/machinery/camera/camera as anything in chunk.cameras[z_key])
if (!camera.can_use() || get_dist(camera, eyeobj) > 7 || !camera.internal_light)
if (!camera || !camera.can_use() || get_dist(camera, eyeobj) > 7 || !camera.internal_light)
continue
visible |= camera