From e55f9d2debf354d68bfcd26efdda26e2ac3e0626 Mon Sep 17 00:00:00 2001 From: Aronai Sieyes Date: Wed, 6 May 2020 20:27:55 -0400 Subject: [PATCH] Add Goon-style pushing --- code/modules/mob/living/living.dm | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index 8fc975073e..d74f43bced 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -224,7 +224,15 @@ default behaviour is: for(var/obj/structure/window/win in get_step(AM,t)) now_pushing = 0 return - step(AM, t) + var/turf/T = AM.loc + var/turf/T2 = get_step(AM,t) + if(!T2) // Map edge + now_pushing = 0 + return + var/move_time = movement_delay(loc, t) + move_time = DS2NEARESTTICK(move_time) + if(AM.Move(T2, t, move_time)) + Move(T, t, move_time) if(ishuman(AM) && AM:grabbed_by) for(var/obj/item/weapon/grab/G in AM:grabbed_by) step(G:assailant, get_dir(G:assailant, AM))