diff --git a/code/_onclick/click.dm b/code/_onclick/click.dm index 147d790919..b061f912a5 100644 --- a/code/_onclick/click.dm +++ b/code/_onclick/click.dm @@ -295,14 +295,19 @@ // Simple helper to face what you clicked on, in case it should be needed in more than one place /mob/proc/face_atom(var/atom/A) - if( stat || buckled || !A || !x || !y || !A.x || !A.y ) return + if( stat || (buckled && !buckled.movable) || !A || !x || !y || !A.x || !A.y ) return var/dx = A.x - x var/dy = A.y - y if(!dx && !dy) return + var/direction if(abs(dx) < abs(dy)) - if(dy > 0) usr.dir = NORTH - else usr.dir = SOUTH + if(dy > 0) direction = NORTH + else direction = SOUTH else - if(dx > 0) usr.dir = EAST - else usr.dir = WEST \ No newline at end of file + if(dx > 0) direction = EAST + else direction = WEST + usr.dir = direction + if(buckled && buckled.movable) + buckled.dir = direction + buckled.handle_rotation() \ No newline at end of file