summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerkeyboard.cpp
diff options
context:
space:
mode:
authorSteven Bennetts <steve@lindenlab.com>2009-08-03 22:25:48 +0000
committerSteven Bennetts <steve@lindenlab.com>2009-08-03 22:25:48 +0000
commitdb5cda26676f376f18816013c0c5e3fbad5b20d0 (patch)
treeb50e52262d34f55b4eaf35a3a1952007ef0a69de /indra/newview/llviewerkeyboard.cpp
parent3c85899ee0db4a90d03ec687e514a31c1befe34e (diff)
merge https://svn.aws.productengine.com/secondlife/export-from-ll/viewer-2-0@1211 https://svn.aws.productengine.com/secondlife/pe/stable-1@1228 -> viewer-2.0.0-3
QA: New movement and camera controls. Test all movement and camera behavior against spec and expected behaviors, including sitting & standing. Many other changes to the bottom bar. Changes to local chat behavior.
Diffstat (limited to 'indra/newview/llviewerkeyboard.cpp')
-rw-r--r--indra/newview/llviewerkeyboard.cpp35
1 files changed, 34 insertions, 1 deletions
diff --git a/indra/newview/llviewerkeyboard.cpp b/indra/newview/llviewerkeyboard.cpp
index 4e0c4023fd..6bb302727d 100644
--- a/indra/newview/llviewerkeyboard.cpp
+++ b/indra/newview/llviewerkeyboard.cpp
@@ -44,6 +44,7 @@
#include "lltoolfocus.h"
#include "llviewerwindow.h"
#include "llvoavatarself.h"
+#include "llfloatercamera.h"
//
// Constants
@@ -135,14 +136,29 @@ static void agent_push_forwardbackward( EKeystate s, S32 direction, LLAgent::EDo
}
}
+void camera_move_forward( EKeystate s );
+
void agent_push_forward( EKeystate s )
{
+ //in free camera control mode we need to intercept keyboard events for avatar movements
+ if (LLFloaterCamera::inFreeCameraMode())
+ {
+ camera_move_forward(s);
+ return;
+ }
agent_push_forwardbackward(s, 1, LLAgent::DOUBLETAP_FORWARD);
}
+void camera_move_backward( EKeystate s );
void agent_push_backward( EKeystate s )
{
+ //in free camera control mode we need to intercept keyboard events for avatar movements
+ if (LLFloaterCamera::inFreeCameraMode())
+ {
+ camera_move_backward(s);
+ return;
+ }
agent_push_forwardbackward(s, -1, LLAgent::DOUBLETAP_BACKWARD);
}
@@ -175,8 +191,17 @@ void agent_slide_right( EKeystate s )
agent_slide_leftright(s, -1, LLAgent::DOUBLETAP_SLIDERIGHT);
}
+void camera_spin_around_cw( EKeystate s );
+
void agent_turn_left( EKeystate s )
{
+ //in free camera control mode we need to intercept keyboard events for avatar movements
+ if (LLFloaterCamera::inFreeCameraMode())
+ {
+ camera_spin_around_cw(s);
+ return;
+ }
+
if (LLToolCamera::getInstance()->mouseSteerMode())
{
agent_slide_left(s);
@@ -189,9 +214,17 @@ void agent_turn_left( EKeystate s )
}
}
+void camera_spin_around_ccw( EKeystate s );
void agent_turn_right( EKeystate s )
{
+ //in free camera control mode we need to intercept keyboard events for avatar movements
+ if (LLFloaterCamera::inFreeCameraMode())
+ {
+ camera_spin_around_ccw(s);
+ return;
+ }
+
if (LLToolCamera::getInstance()->mouseSteerMode())
{
agent_slide_right(s);
@@ -842,7 +875,7 @@ EKeyboardMode LLViewerKeyboard::getMode()
{
return MODE_EDIT_AVATAR;
}
- else if (gAgent.getAvatarObject() && gAgent.getAvatarObject()->mIsSitting)
+ else if (gAgent.getAvatarObject() && gAgent.getAvatarObject()->isSitting())
{
return MODE_SITTING;
}