[MANUAL MIRROR] Fixes AI's trying to light up cameras in areas with no cameras (#75302) (#21072)

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.

Co-authored-by: ShizCalev <ShizCalev@users.noreply.github.com>
This commit is contained in:
coldud13
2023-05-10 22:55:24 -07:00
committed by GitHub
co-authored by ShizCalev
parent 2437fb9d8e
commit 52585ec7c6
+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