diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index 0ec0a969ef1..e823161f01c 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -572,11 +572,19 @@ /mob/living/proc/pull_grabbed(turf/old_turf, direct, movetime) if(!Adjacent(old_turf)) return + // We might not actually be grab pulled, but we are pretending that we are, so as to + // hackily work around issues arising from mutual grabs. + var/old_being_pulled = currently_grab_pulled + currently_grab_pulled = TRUE // yes, this is four distinct `for` loops. No, they can't be merged. var/list/grabbing = list() for(var/mob/M in ret_grab()) - if(src != M) - grabbing |= M + if(src == M) + continue + if(M.currently_grab_pulled) + // Being already pulled by something else up the call stack. + continue + grabbing |= M for(var/mob/M in grabbing) M.currently_grab_pulled = TRUE M.animate_movement = SYNC_STEPS @@ -613,6 +621,8 @@ for(var/obj/item/grab/G in grabbed_by) G.adjust_position() + currently_grab_pulled = old_being_pulled + /mob/living/proc/makeTrail(turf/T) if(!has_gravity(src))