mirror of
https://github.com/CHOMPstation/CHOMPstation.git
synced 2026-08-22 11:36:38 +01:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user