From a6fa7ad1763f8325c1d81f2935e80da793b0bc7e Mon Sep 17 00:00:00 2001 From: "giacomand@gmail.com" Date: Mon, 27 Aug 2012 11:52:21 +0000 Subject: [PATCH] -Fixed an AI eye issue where tracking a person from your core won't set your eye.dm -Tracking now works like it has again. The else if weren't working because the "else if human" check would make them pass all of it. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4563 316c924e-a436-60f5-8080-3fe189b3f50e --- code/game/machinery/camera.dm | 15 +++++++++------ .../modules/mob/living/silicon/ai/freelook/eye.dm | 3 +++ 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/code/game/machinery/camera.dm b/code/game/machinery/camera.dm index b8b9ba8e106..93f46b97d17 100644 --- a/code/game/machinery/camera.dm +++ b/code/game/machinery/camera.dm @@ -44,6 +44,9 @@ var/obj/item/clothing/head/helmet/space/space_ninja/hood = H.head if(!hood.canremove) continue + + if(!isturf(M.loc)) + continue // Now, are they viewable by a camera? (This is last because it's the most intensive check) if(!cameranet.checkCameraVis(M)) continue @@ -84,7 +87,7 @@ while (U.cameraFollow == target) if (U.cameraFollow == null) return - else if (istype(target, /mob/living/carbon/human)) + if (istype(target, /mob/living/carbon/human)) if(istype(target:wear_id, /obj/item/weapon/card/id/syndicate)) U << "Follow camera mode terminated." U.cameraFollow = null @@ -98,17 +101,17 @@ U.cameraFollow = null return - else if(istype(target.loc,/obj/effect/dummy)) + if(istype(target.loc,/obj/effect/dummy)) U << "Follow camera mode ended." U.cameraFollow = null return - else if (!target || !istype(target.loc, /turf)) //in a closet + if (!isturf(target.loc)) //in a closet U << "Target is not on or near any active cameras on the station. We'll check again in 5 seconds (unless you use the cancel-camera verb)." - sleep(30) //because we're sleeping another second after this (a few lines down) + sleep(50) //because we're sleeping another second after this (a few lines down) continue - else if(!cameranet.checkCameraVis(target)) + if(!cameranet.checkCameraVis(target)) U << "Target is not on or near any active cameras on the station. We'll check again in 5 seconds (unless you use the cancel-camera verb)." - sleep(30) //because we're sleeping another second after this (a few lines down) + sleep(50) //because we're sleeping another second after this (a few lines down) continue U.eyeobj.setLoc(get_turf(target)) diff --git a/code/modules/mob/living/silicon/ai/freelook/eye.dm b/code/modules/mob/living/silicon/ai/freelook/eye.dm index 9a83b9963d5..254a6d5206f 100644 --- a/code/modules/mob/living/silicon/ai/freelook/eye.dm +++ b/code/modules/mob/living/silicon/ai/freelook/eye.dm @@ -37,6 +37,9 @@ T = get_turf(T) loc = T cameranet.visibility(src) + if(ai) + if(ai.client) + ai.client.eye = src // AI MOVEMENT