From 44f3bad1423c2562baeffe63d3e53a0dd405762f Mon Sep 17 00:00:00 2001 From: FalloutFalcon Date: Sun, 2 Aug 2026 20:31:41 -0500 Subject: [PATCH 1/2] yea. --- code/game/atoms_movable.dm | 2 +- modular_darkpack/modules/z_travel/code/helpers.dm | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/code/game/atoms_movable.dm b/code/game/atoms_movable.dm index fc38c768c7f6..be6849588cb9 100644 --- a/code/game/atoms_movable.dm +++ b/code/game/atoms_movable.dm @@ -433,7 +433,7 @@ //makes conga lines work with ladders and flying up and down; checks if the guy you are pulling is pulling someone, //then uses recursion to run the same function again - if (pulling.pulling) + if (pulling.pulling && (pulling.pulling != src)) // DARKPACK EDIT CHANGE - (Fix infinite recursioin) . |= pulling.pulling.get_z_move_affected(z_move_flags) /** diff --git a/modular_darkpack/modules/z_travel/code/helpers.dm b/modular_darkpack/modules/z_travel/code/helpers.dm index 33163676331d..b90b1e270f43 100644 --- a/modular_darkpack/modules/z_travel/code/helpers.dm +++ b/modular_darkpack/modules/z_travel/code/helpers.dm @@ -12,5 +12,5 @@ if (pulling.buckled_mobs) . |= pulling.buckled_mobs - if (pulling.pulling) + if (pulling.pulling && (pulling.pulling != src)) . |= pulling.pulling.get_teleport_move_affected() From efc2f21f12eb28c6a57584ee6db061dac632c0e7 Mon Sep 17 00:00:00 2001 From: FalloutFalcon Date: Sun, 2 Aug 2026 21:55:55 -0500 Subject: [PATCH 2/2] even better code --- modular_darkpack/modules/z_travel/code/helpers.dm | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/modular_darkpack/modules/z_travel/code/helpers.dm b/modular_darkpack/modules/z_travel/code/helpers.dm index b90b1e270f43..a782ee4579a2 100644 --- a/modular_darkpack/modules/z_travel/code/helpers.dm +++ b/modular_darkpack/modules/z_travel/code/helpers.dm @@ -1,16 +1,13 @@ // Copypasta of get_z_move_affected /// Returns a list of movables that should also be affected when src moves through teleporters, and src. -/atom/movable/proc/get_teleport_move_affected() - . = list(src) +/atom/movable/proc/get_teleport_move_affected(list/returning_list = list()) + . = returning_list + . |= src if(buckled_mobs) . |= buckled_mobs for(var/mob/living/buckled as anything in buckled_mobs) if(buckled.pulling) . |= buckled.pulling - if(pulling) - . |= pulling - if (pulling.buckled_mobs) - . |= pulling.buckled_mobs - - if (pulling.pulling && (pulling.pulling != src)) - . |= pulling.pulling.get_teleport_move_affected() + //we pass in the list from this proc to ensure we dont reach an infinite loop due to mobs grabbed in a loop or two mobs grabing eachother. + if(pulling && !(pulling in .)) + . |= pulling.get_z_move_affected(.)