From dd8461d0a09fec6b923b9f4f3e9c58a85f099417 Mon Sep 17 00:00:00 2001 From: AnturK Date: Fri, 6 Jul 2018 18:39:28 +0200 Subject: [PATCH 1/2] Fixes animals trying to break map border (#38929) --- 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 65e82ea617..017af381f0 100644 --- a/code/modules/mob/living/simple_animal/hostile/hostile.dm +++ b/code/modules/mob/living/simple_animal/hostile/hostile.dm @@ -369,7 +369,7 @@ /mob/living/simple_animal/hostile/proc/DestroyObjectsInDirection(direction) var/turf/T = get_step(targets_from, direction) - if(T.Adjacent(targets_from)) + if(T && T.Adjacent(targets_from)) if(CanSmashTurfs(T)) T.attack_animal(src) for(var/obj/O in T)