From cd28a471df1ae9c0c819c41e70fa2e94dbe15acc Mon Sep 17 00:00:00 2001 From: AnturK Date: Sun, 8 Oct 2017 20:15:35 +0200 Subject: [PATCH] Fixes mob swap on tables. (#31414) --- code/modules/mob/living/living.dm | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index cf24d3228d2..124c9e99af4 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -152,16 +152,20 @@ M.pass_flags |= PASSMOB pass_flags |= PASSMOB - M.Move(oldloc) - Move(oldMloc) - + var/move_failed = FALSE + if(!M.Move(oldloc) || !Move(oldMloc)) + M.forceMove(oldMloc) + forceMove(oldloc) + move_failed = TRUE if(!src_passmob) pass_flags &= ~PASSMOB if(!M_passmob) M.pass_flags &= ~PASSMOB now_pushing = 0 - return 1 + + if(!move_failed) + return 1 //okay, so we didn't switch. but should we push? //not if he's not CANPUSH of course