From 8059894d7d830c0b6ef7659a4161ac5fcfbf5498 Mon Sep 17 00:00:00 2001 From: Jordan Brown Date: Fri, 29 Dec 2017 11:01:45 -0500 Subject: [PATCH 1/2] Merge pull request #33903 from AnturK/pilot-fixes Fixes mobs targeting from inside things. --- code/modules/mob/living/simple_animal/hostile/hostile.dm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/code/modules/mob/living/simple_animal/hostile/hostile.dm b/code/modules/mob/living/simple_animal/hostile/hostile.dm index 10d9fd93d7..6432eb0484 100644 --- a/code/modules/mob/living/simple_animal/hostile/hostile.dm +++ b/code/modules/mob/living/simple_animal/hostile/hostile.dm @@ -235,7 +235,8 @@ LoseTarget() return 0 if(target in possible_targets) - if(target.z != z) + var/turf/T = get_turf(src) + if(target.z != T.z) LoseTarget() return 0 var/target_distance = get_dist(targets_from,target) @@ -417,7 +418,7 @@ mob/living/simple_animal/hostile/proc/DestroySurroundings() // for use with mega if(buckled) buckled.attack_animal(src) if(!isturf(targets_from.loc) && targets_from.loc != null)//Did someone put us in something? - var/atom/A = get_turf(targets_from) + var/atom/A = targets_from.loc A.attack_animal(src)//Bang on it till we get out