From 8cb6fe2695fae0ae37a042ff052c613702970ddd Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Fri, 21 Nov 2014 18:19:40 +0200 Subject: MAINT-4682 FIXED Viewer won't clear AGENT_ALWAYS_RUN while sitting --- indra/newview/llviewerkeyboard.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'indra/newview/llviewerkeyboard.cpp') diff --git a/indra/newview/llviewerkeyboard.cpp b/indra/newview/llviewerkeyboard.cpp index a4a05587d3..35b55029cc 100755 --- a/indra/newview/llviewerkeyboard.cpp +++ b/indra/newview/llviewerkeyboard.cpp @@ -320,8 +320,8 @@ void camera_spin_around_cw( EKeystate s ) void camera_spin_around_ccw_sitting( EKeystate s ) { - if( KEYSTATE_UP == s ) return; - if (gAgent.rotateGrabbed() || gAgentCamera.sitCameraEnabled()) + if( KEYSTATE_UP == s && gAgent.mDoubleTapRunMode != LLAgent::DOUBLETAP_SLIDERIGHT ) return; + if (gAgent.rotateGrabbed() || gAgentCamera.sitCameraEnabled() || gAgent.getRunning()) { //send keystrokes, but do not change camera agent_turn_right(s); @@ -336,8 +336,8 @@ void camera_spin_around_ccw_sitting( EKeystate s ) void camera_spin_around_cw_sitting( EKeystate s ) { - if( KEYSTATE_UP == s ) return; - if (gAgent.rotateGrabbed() || gAgentCamera.sitCameraEnabled()) + if( KEYSTATE_UP == s && gAgent.mDoubleTapRunMode != LLAgent::DOUBLETAP_SLIDELEFT ) return; + if (gAgent.rotateGrabbed() || gAgentCamera.sitCameraEnabled() || gAgent.getRunning()) { //send keystrokes, but do not change camera agent_turn_left(s); @@ -413,8 +413,8 @@ void camera_move_backward( EKeystate s ) void camera_move_forward_sitting( EKeystate s ) { - if( KEYSTATE_UP == s ) return; - if (gAgent.forwardGrabbed() || gAgentCamera.sitCameraEnabled()) + if( KEYSTATE_UP == s && gAgent.mDoubleTapRunMode != LLAgent::DOUBLETAP_FORWARD ) return; + if (gAgent.forwardGrabbed() || gAgentCamera.sitCameraEnabled() || gAgent.getRunning()) { agent_push_forward(s); } @@ -427,9 +427,9 @@ void camera_move_forward_sitting( EKeystate s ) void camera_move_backward_sitting( EKeystate s ) { - if( KEYSTATE_UP == s ) return; + if( KEYSTATE_UP == s && gAgent.mDoubleTapRunMode != LLAgent::DOUBLETAP_BACKWARD ) return; - if (gAgent.backwardGrabbed() || gAgentCamera.sitCameraEnabled()) + if (gAgent.backwardGrabbed() || gAgentCamera.sitCameraEnabled() || gAgent.getRunning()) { agent_push_backward(s); } -- cgit v1.2.3 From 0a32de770d6ec82bb89b86d0d278470602eeb355 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Wed, 3 Dec 2014 11:58:41 +0200 Subject: MAINT-1871 FIXED Don't allow moving avatar while changing camera position. --- indra/newview/llviewerkeyboard.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'indra/newview/llviewerkeyboard.cpp') diff --git a/indra/newview/llviewerkeyboard.cpp b/indra/newview/llviewerkeyboard.cpp index 35b55029cc..9766a25521 100755 --- a/indra/newview/llviewerkeyboard.cpp +++ b/indra/newview/llviewerkeyboard.cpp @@ -149,6 +149,8 @@ void camera_move_forward( EKeystate s ); void agent_push_forward( EKeystate s ) { + if(gAgent.isMovementLocked()) return; + //in free camera control mode we need to intercept keyboard events for avatar movements if (LLFloaterCamera::inFreeCameraMode()) { @@ -164,6 +166,8 @@ void camera_move_backward( EKeystate s ); void agent_push_backward( EKeystate s ) { + if(gAgent.isMovementLocked()) return; + //in free camera control mode we need to intercept keyboard events for avatar movements if (LLFloaterCamera::inFreeCameraMode()) { @@ -199,12 +203,14 @@ static void agent_slide_leftright( EKeystate s, S32 direction, LLAgent::EDoubleT void agent_slide_left( EKeystate s ) { + if(gAgent.isMovementLocked()) return; agent_slide_leftright(s, 1, LLAgent::DOUBLETAP_SLIDELEFT); } void agent_slide_right( EKeystate s ) { + if(gAgent.isMovementLocked()) return; agent_slide_leftright(s, -1, LLAgent::DOUBLETAP_SLIDERIGHT); } @@ -219,6 +225,8 @@ void agent_turn_left( EKeystate s ) return; } + if(gAgent.isMovementLocked()) return; + if (LLToolCamera::getInstance()->mouseSteerMode()) { agent_slide_left(s); @@ -247,6 +255,8 @@ void agent_turn_right( EKeystate s ) return; } + if(gAgent.isMovementLocked()) return; + if (LLToolCamera::getInstance()->mouseSteerMode()) { agent_slide_right(s); -- cgit v1.2.3