From 30cce4fc03766fe244ad07ca8bf9b1f3c7866cf0 Mon Sep 17 00:00:00 2001 From: Zuhayr Date: Tue, 25 Jun 2013 22:29:44 -0700 Subject: [PATCH] Fixes simple animal pinning. --- code/modules/mob/living/living_defense.dm | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/code/modules/mob/living/living_defense.dm b/code/modules/mob/living/living_defense.dm index 3aafe99d06..b7ba0a7803 100644 --- a/code/modules/mob/living/living_defense.dm +++ b/code/modules/mob/living/living_defense.dm @@ -95,18 +95,18 @@ src.throw_at(get_edge_target_turf(src,dir),1,momentum) if(istype(W.loc,/mob/living) && W.sharp) //Projectile is embedded and suitable for pinning. + + if(!istype(src,/mob/living/carbon/human)) //Handles embedding for non-humans and simple_animals. + O.loc = src + src.embedded += O + var/turf/T = near_wall(dir,2) + if(T) src.loc = T visible_message("[src] is pinned to the wall by [O]!","You are pinned to the wall by [O]!") - if(!istype(src,/mob/living/carbon/human)) - O.loc = src - src.embedded += O - src.anchored = 1 - src.pinned += O - else - src.anchored = 1 - src.pinned += O + src.anchored = 1 + src.pinned += O /mob/living/proc/near_wall(var/direction,var/distance=1)