From fd18afec6788a19463b6bf6d00e33f2a9cd17f38 Mon Sep 17 00:00:00 2001 From: n3ophyt3 Date: Thu, 27 Oct 2011 16:40:27 +0000 Subject: [PATCH] Turrets are once again smart enough to stop firing at someone that has teleported out of their protected area. Bloody ConstantA missing that part during his optimization of the turret code. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@2435 316c924e-a436-60f5-8080-3fe189b3f50e --- code/game/machinery/turrets.dm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/code/game/machinery/turrets.dm b/code/game/machinery/turrets.dm index 60b8d6933c2..b0e1dac14e6 100644 --- a/code/game/machinery/turrets.dm +++ b/code/game/machinery/turrets.dm @@ -118,6 +118,9 @@ /obj/machinery/turret/proc/check_target(var/atom/movable/T as mob|obj) if(T && T in protected_area.turretTargets) + if(!T in protected_area) + protected_area.Exited(T) + return 0 //If the guy is somehow not in the turret's area (teleportation), get them out the damn list. --NEO if(istype(T, /mob/living/carbon)) var/mob/living/carbon/MC = T if(!MC.stat)