From e98f578ea50e118d11099dffbd6f7628d84dbbac Mon Sep 17 00:00:00 2001 From: Anewbe Date: Wed, 13 Feb 2019 10:42:26 -0600 Subject: [PATCH] Fixes the 'cannot push thing being pulled' bug and other weirdness. --- code/modules/mob/living/living.dm | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index f1a5238f78..fe89afd4ce 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -767,7 +767,6 @@ default behaviour is: return /mob/living/Move(a, b, flag) - if (buckled && buckled.loc != a) //not updating position if(istype(buckled, /mob)) //If you're buckled to a mob, a la slime things, keep on rolling. return buckled.Move(a, b) @@ -853,9 +852,12 @@ default behaviour is: if(istype(location, /turf/simulated)) location.add_blood(M) - step(pulling, get_dir(pulling.loc, T)) - if(t) - M.start_pulling(t) + if(get_dist(pulling.loc, T) > 1 || pulling.loc.z != T.z) + M.stop_pulling() + else + step(pulling, get_dir(pulling.loc, T)) + if(t) + M.start_pulling(t) else if (pulling) if (istype(pulling, /obj/structure/window)) @@ -863,8 +865,11 @@ default behaviour is: if(W.is_fulltile()) for(var/obj/structure/window/win in get_step(pulling,get_dir(pulling.loc, T))) stop_pulling() - if (pulling) - step(pulling, get_dir(pulling.loc, T)) + + if(get_dist(pulling.loc, T) > 1 || pulling.loc.z != T.z) // This is needed or else pulled objects can't get pushed away. + stop_pulling() + else + step(pulling, get_dir(pulling.loc, T)) else stop_pulling() . = ..()