diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index 1fec8e44db44..4e0b442bc511 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -1261,19 +1261,19 @@ //basic fast checks go first. When overriding this proc, I recommend calling ..() at the end. if(SEND_SIGNAL(src, COMSIG_LIVING_CAN_TRACK, user) & COMPONENT_CANT_TRACK) return FALSE - var/turf/T = get_turf(src) - if(!T) + if(!isnull(user) && src == user) + return FALSE + if(invisibility || alpha <= 50)//cloaked + return FALSE + if(!isturf(src.loc)) //The reason why we don't just use get_turf is because they could be in a closet, disposals, or a vehicle. return FALSE + var/turf/T = src.loc if(is_centcom_level(T.z)) //dont detect mobs on centcom return FALSE if(is_away_level(T.z)) return FALSE if(onSyndieBase() && !(ROLE_SYNDICATE in user?.faction)) return FALSE - if(!isnull(user) && src == user) - return FALSE - if(invisibility || alpha == 0)//cloaked - return FALSE // Now, are they viewable by a camera? (This is last because it's the most intensive check) if(!GLOB.cameranet.checkCameraVis(src)) return FALSE