From 5a02c882a97bb786edd7c93dabcd2d2406787d30 Mon Sep 17 00:00:00 2001 From: Kashargul <144968721+Kashargul@users.noreply.github.com> Date: Sun, 17 Mar 2024 08:56:18 +0100 Subject: [PATCH] fixes stair pulling (#7988) --- code/modules/multiz/stairs.dm | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/code/modules/multiz/stairs.dm b/code/modules/multiz/stairs.dm index f470ba56df..fd9702b9de 100644 --- a/code/modules/multiz/stairs.dm +++ b/code/modules/multiz/stairs.dm @@ -214,11 +214,15 @@ if(L.buckled) L.buckled.forceMove(get_turf(top)) + var/atom/movable/P = null + if(L.pulling && !L.pulling.anchored) + P = L.pulling + P.forceMove(get_turf(L)) + L.forceMove(get_turf(top)) // If the object is pulling or grabbing anything, we'll want to move those too. A grab chain may be disrupted in doing so. - if(L.pulling && !L.pulling.anchored) - var/atom/movable/P = L.pulling + if(P) P.forceMove(get_turf(top)) L.continue_pulling(P) @@ -469,11 +473,15 @@ if(L.buckled) L.buckled.forceMove(get_turf(bottom)) + var/atom/movable/P = null + if(L.pulling && !L.pulling.anchored) + P = L.pulling + P.forceMove(get_turf(L)) + L.forceMove(get_turf(bottom)) // If the object is pulling or grabbing anything, we'll want to move those too. A grab chain may be disrupted in doing so. - if(L.pulling && !L.pulling.anchored) - var/atom/movable/P = L.pulling + if(P) P.forceMove(get_turf(bottom)) L.continue_pulling(P)