Skip to content
This repository has been archived by the owner on Oct 6, 2022. It is now read-only.

Commit

Permalink
Updates camera.dm to check for client (#63304)
Browse files Browse the repository at this point in the history
  • Loading branch information
tf-4 authored Dec 11, 2021
1 parent dc510bc commit 3a68ae5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions code/game/machinery/camera/camera.dm
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/machinery/camera/xray, 0)
addtimer(CALLBACK(src, .proc/post_emp_reset, emped, network), 90 SECONDS)
for(var/i in GLOB.player_list)
var/mob/M = i
if (M.client.eye == src)
if (M.client?.eye == src)
M.unset_machine()
M.reset_perspective(null)
to_chat(M, span_warning("The screen bursts into static!"))
Expand Down Expand Up @@ -350,7 +350,7 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/machinery/camera/xray, 0)
to_chat(AI, "<b><a href='?src=[REF(AI)];track=[html_encode(paper_user.name)]'>[paper_user]</a></b> holds <a href='?_src_=usr;show_paper=1;'>\a [itemname]</a> up to one of your cameras ...")
AI.log_talk(itemname, LOG_VICTIM, tag="Pressed to camera from [key_name(paper_user)]", log_globally=FALSE)
AI.last_paper_seen = "<HTML><HEAD><TITLE>[itemname]</TITLE></HEAD><BODY><TT>[info]</TT></BODY></HTML>"
else if (potential_viewer.client.eye == src)
else if (potential_viewer.client?.eye == src)
to_chat(potential_viewer, "[span_name("[paper_user]")] holds \a [itemname] up to one of the cameras ...")
potential_viewer.log_talk(itemname, LOG_VICTIM, tag="Pressed to camera from [key_name(paper_user)]", log_globally=FALSE)
potential_viewer << browse(text("<HTML><HEAD><TITLE>[]</TITLE></HEAD><BODY><TT>[]</TT></BODY></HTML>", itemname, info), text("window=[]", itemname))
Expand Down Expand Up @@ -451,7 +451,7 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/machinery/camera/xray, 0)
//Apparently, this will disconnect anyone even if the camera was re-activated.
//I guess that doesn't matter since they can't use it anyway?
for(var/mob/O in GLOB.player_list)
if (O.client.eye == src)
if (O.client?.eye == src)
O.unset_machine()
O.reset_perspective(null)
to_chat(O, span_warning("The screen bursts into static!"))
Expand Down

0 comments on commit 3a68ae5

Please sign in to comment.