From bb1c2747d7acda1288a57a1ada19c2ecc9989454 Mon Sep 17 00:00:00 2001 From: Kashargul <144968721+Kashargul@users.noreply.github.com> Date: Mon, 18 Mar 2024 11:29:02 +0100 Subject: [PATCH] fixes execution order for stair pulling (#15838) * fixes execution order for pulling * . --- code/modules/multiz/stairs.dm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/code/modules/multiz/stairs.dm b/code/modules/multiz/stairs.dm index ee6ad2e0abf..fd9702b9de5 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)