From 32be60459f81c19f654aae175b600753cc50a346 Mon Sep 17 00:00:00 2001 From: kevinz000 <2003111+kevinz000@users.noreply.github.com> Date: Wed, 8 Jan 2020 15:16:35 -0800 Subject: [PATCH] living, not mob (#48655) --- code/datums/components/riding.dm | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/code/datums/components/riding.dm b/code/datums/components/riding.dm index 3840845a4c4..7ec58c5318d 100644 --- a/code/datums/components/riding.dm +++ b/code/datums/components/riding.dm @@ -20,6 +20,9 @@ var/ride_check_ridden_incapacitated = FALSE var/del_on_unbuckle_all = FALSE + + /// If the "vehicle" is a mob, respect MOBILITY_MOVE on said mob. + var/respect_mob_mobility = TRUE /datum/component/riding/Initialize() if(!ismovableatom(parent)) @@ -175,6 +178,10 @@ return if(!Process_Spacemove(direction) || !isturf(AM.loc)) return + if(isliving(AM) && respect_mob_mobility) + var/mob/living/M = AM + if(!(M.mobility_flags & MOBILITY_MOVE)) + return step(AM, direction) if((direction & (direction - 1)) && (AM.loc == next)) //moved diagonally