From 49ffaefa1400db55df7c05c265b557a3cf6b180e Mon Sep 17 00:00:00 2001 From: Aronai Sieyes Date: Tue, 20 Jul 2021 14:39:44 -0400 Subject: [PATCH] Add code to trace recursive buckle issue Also prevents it in the meantime. --- code/game/objects/buckling.dm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/code/game/objects/buckling.dm b/code/game/objects/buckling.dm index fa2af7d0afa..145d4af2689 100644 --- a/code/game/objects/buckling.dm +++ b/code/game/objects/buckling.dm @@ -54,6 +54,10 @@ if(!can_buckle_check(M, forced)) return FALSE + if(M == src) + stack_trace("Recursive buckle warning: [M] being buckled to self.") + return + M.buckled = src M.facing_dir = null M.set_dir(buckle_dir ? buckle_dir : dir)