- 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
This commit is contained in:
baloh.matevz
2012-02-10 19:17:50 +00:00
parent 3234bceaf9
commit 08a23a1ed8

View File

@@ -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 -------