Fixes simple animal pinning.

This commit is contained in:
Zuhayr
2013-06-25 22:29:44 -07:00
parent a0624c4c4d
commit 30cce4fc03

View File

@@ -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("<span class='warning'>[src] is pinned to the wall by [O]!</span>","<span class='warning'>You are pinned to the wall by [O]!</span>")
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)