Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion code/game/atoms_movable.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)

/**
Expand Down
15 changes: 6 additions & 9 deletions modular_darkpack/modules/z_travel/code/helpers.dm
Original file line number Diff line number Diff line change
@@ -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.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(.)
Loading