diff --git a/code/game/machinery/computer/camera_advanced.dm b/code/game/machinery/computer/camera_advanced.dm index 4750feb3b9b..a2b1b30183b 100644 --- a/code/game/machinery/computer/camera_advanced.dm +++ b/code/game/machinery/computer/camera_advanced.dm @@ -74,17 +74,18 @@ CRASH("[type] does not implement ai eye handling") /obj/machinery/computer/camera_advanced/remove_eye_control(mob/living/user) - if(!user) + if(isnull(user?.client)) return + for(var/datum/action/actions_removed as anything in actions) actions_removed.Remove(user) for(var/datum/camerachunk/camerachunks_gone as anything in eyeobj.visibleCameraChunks) camerachunks_gone.remove(eyeobj) - if(user.client) - user.reset_perspective(null) - if(eyeobj.visible_icon && user.client) - user.client.images -= eyeobj.user_image - user.client.view_size.unsupress() + + user.reset_perspective(null) + if(eyeobj.visible_icon) + user.client.images -= eyeobj.user_image + user.client.view_size.unsupress() eyeobj.eye_user = null user.remote_control = null @@ -121,6 +122,8 @@ return if(!can_use(user)) return + if(isnull(user.client)) + return if(current_user) to_chat(user, span_warning("The console is already in use!")) return @@ -165,6 +168,8 @@ return //AIs would need to disable their own camera procs to use the console safely. Bugs happen otherwise. /obj/machinery/computer/camera_advanced/proc/give_eye_control(mob/user) + if(isnull(user?.client)) + return GrantActions(user) current_user = user eyeobj.eye_user = user