From b5981147dd60a789a315e2d527681a61ca2d3061 Mon Sep 17 00:00:00 2001 From: AnturK Date: Sun, 8 Oct 2017 20:15:35 +0200 Subject: [PATCH 1/2] 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 f4e85e40fb..2fc6f79ec3 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