From 08a23a1ed8fb9a7cf8f2924c65ad8f135bb05034 Mon Sep 17 00:00:00 2001 From: "baloh.matevz" Date: Fri, 10 Feb 2012 19:17:50 +0000 Subject: [PATCH] - Clicking when buckled won't change your facing direction - Clicking on objects which have their pixel_x and pixel_y number larger than +/- 16 will now make you face in the direction they're moved to (IE wall mounted things) git-svn-id: http://tgstation13.googlecode.com/svn/trunk@3079 316c924e-a436-60f5-8080-3fe189b3f50e --- code/game/atom_procs.dm | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/code/game/atom_procs.dm b/code/game/atom_procs.dm index b215e6c1877..a15382849f3 100644 --- a/code/game/atom_procs.dm +++ b/code/game/atom_procs.dm @@ -573,7 +573,7 @@ var/using_new_click_proc = 0 //TODO ERRORAGE (This is temporary, while the DblCl // ------- DIR CHANGING WHEN CLICKING (changes facting direction) ------ - if( usr && iscarbon(usr) ) + if( usr && iscarbon(usr) && !usr.buckled ) if( src.x && src.y && usr.x && usr.y ) var/dx = src.x - usr.x var/dy = src.y - usr.y @@ -586,6 +586,15 @@ var/using_new_click_proc = 0 //TODO ERRORAGE (This is temporary, while the DblCl usr.dir = 4 if( dx < 0 && abs(dy) <= abs(dx) ) //West usr.dir = 8 + if( dx == 0 && dy == 0 ) + if(src.pixel_y > 16) + usr.dir = 1 + if(src.pixel_y < -16) + usr.dir = 2 + if(src.pixel_x > 16) + usr.dir = 4 + if(src.pixel_x < -16) + usr.dir = 8 // ------- SHIFT-CLICK -------