From 9976f33067c7271e0db6761517f8eabbefa0f1f5 Mon Sep 17 00:00:00 2001 From: AnturK Date: Thu, 28 Dec 2017 14:38:28 +0100 Subject: [PATCH 1/2] Fixes mobs targeting from inside things. --- code/modules/mob/living/simple_animal/hostile/hostile.dm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code/modules/mob/living/simple_animal/hostile/hostile.dm b/code/modules/mob/living/simple_animal/hostile/hostile.dm index 54872c298b4..b4887d208b8 100644 --- a/code/modules/mob/living/simple_animal/hostile/hostile.dm +++ b/code/modules/mob/living/simple_animal/hostile/hostile.dm @@ -229,7 +229,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) From acd01e7c91dd24cc62e55d37a4d730488c350ad2 Mon Sep 17 00:00:00 2001 From: AnturK Date: Thu, 28 Dec 2017 14:47:27 +0100 Subject: [PATCH 2/2] Actually fixes the locker escaping. --- code/modules/mob/living/simple_animal/hostile/hostile.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/mob/living/simple_animal/hostile/hostile.dm b/code/modules/mob/living/simple_animal/hostile/hostile.dm index b4887d208b8..59a9559ce80 100644 --- a/code/modules/mob/living/simple_animal/hostile/hostile.dm +++ b/code/modules/mob/living/simple_animal/hostile/hostile.dm @@ -404,7 +404,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