Moving while unable to move and grabbed acts as a shortcut for resist

This commit is contained in:
HarpyEagle
2016-06-20 00:08:36 +01:00
committed by Yoshax
parent b410d43eb5
commit fd3a3175ae
+9 -4
View File
@@ -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"