Having a neck grab on someone causes them to be hit by projectiles first instead of you.

If however the bullet misses or passes through the person being grabbed then it continues on and may still hit the person doing the grabbing.
This commit is contained in:
mwerezak
2015-03-14 01:30:09 -04:00
parent 812ff9869d
commit c4e4c77320
2 changed files with 8 additions and 1 deletions
+7
View File
@@ -194,6 +194,13 @@
if(ismob(A))
var/mob/M = A
if(istype(A, /mob/living))
//if they have a neck grab on someone, that person gets hit instead
for(var/obj/item/weapon/grab/G in list(M.l_hand, M.r_hand))
if(G.state >= GRAB_NECK)
//If Bump() returns 0 (missed them or went through them) then we continue on to attack M.
if(Bump(G.affecting))
return
passthrough = !attack_mob(M, distance)
else
passthrough = 1 //so ghosts don't stop bullets