From 5071ea57ad684ce31d1dc62eb37d19bc2e44353e Mon Sep 17 00:00:00 2001 From: Chinsky Date: Wed, 25 Dec 2013 14:20:56 +0400 Subject: [PATCH] Fix for #3583 Hostile mobs now check adjacency before applying damage. --- code/modules/mob/living/simple_animal/hostile/bear.dm | 2 ++ code/modules/mob/living/simple_animal/hostile/hostile.dm | 2 ++ 2 files changed, 4 insertions(+) diff --git a/code/modules/mob/living/simple_animal/hostile/bear.dm b/code/modules/mob/living/simple_animal/hostile/bear.dm index 6fd7db5d10e..f82ae07c57a 100644 --- a/code/modules/mob/living/simple_animal/hostile/bear.dm +++ b/code/modules/mob/living/simple_animal/hostile/bear.dm @@ -125,6 +125,8 @@ ..(5) /mob/living/simple_animal/hostile/bear/AttackingTarget() + if(!Adjacent(target_mob)) + return emote( pick( list("slashes at [target_mob]", "bites [target_mob]") ) ) var/damage = rand(20,30) diff --git a/code/modules/mob/living/simple_animal/hostile/hostile.dm b/code/modules/mob/living/simple_animal/hostile/hostile.dm index 403c31b17f2..2dcbe0d949f 100644 --- a/code/modules/mob/living/simple_animal/hostile/hostile.dm +++ b/code/modules/mob/living/simple_animal/hostile/hostile.dm @@ -87,6 +87,8 @@ return 1 /mob/living/simple_animal/hostile/proc/AttackingTarget() + if(!Adjacent(target_mob)) + return if(isliving(target_mob)) var/mob/living/L = target_mob L.attack_animal(src)