From fd3a3175ae8577a90b807b3fca44c36f12473a9e Mon Sep 17 00:00:00 2001 From: HarpyEagle Date: Fri, 13 May 2016 00:03:05 -0400 Subject: [PATCH] Moving while unable to move and grabbed acts as a shortcut for resist --- code/modules/mob/mob_grab.dm | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/code/modules/mob/mob_grab.dm b/code/modules/mob/mob_grab.dm index 47e05847402..b41d07dbb69 100644 --- a/code/modules/mob/mob_grab.dm +++ b/code/modules/mob/mob_grab.dm @@ -3,12 +3,17 @@ ///Process_Grab() ///Called by client/Move() -///Checks to see if you are grabbing anything and if moving will affect your grab. +///Checks to see if you are grabbing or being grabbed by anything and if moving will affect your grab. /client/proc/Process_Grab() - if(istype(mob, /mob/living)) + //if we are being grabbed + if(isliving(mob)) var/mob/living/L = mob - for(var/obj/item/weapon/grab/G in list(L.l_hand, L.r_hand)) - G.reset_kill_state() //no wandering across the station/asteroid while choking someone + if(!L.canmove && L.grabbed_by.len) + L.resist() //shortcut for resisting grabs + + //if we are grabbing someone + for(var/obj/item/weapon/grab/G in list(mob.l_hand, mob.r_hand)) + G.reset_kill_state() //no wandering across the station/asteroid while choking someone /obj/item/weapon/grab name = "grab"