summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerkeyboard.cpp
diff options
context:
space:
mode:
authorbrad kittenbrink <brad@lindenlab.com>2009-08-04 15:34:34 -0700
committerbrad kittenbrink <brad@lindenlab.com>2009-08-04 15:34:34 -0700
commit33cc363a6813bf6c1268fa85747d1d403e00f8e5 (patch)
treed30696b245c4b5eb70575582d0dd9ddc4b20e5c7 /indra/newview/llviewerkeyboard.cpp
parentdc62495da6e5c153c0df57fdbce6b0f40c0208f2 (diff)
parent89434ef6e64462041368ab26e049011fc84ae1e3 (diff)
Merged in latest viewer-2.0.0-3 up through svn r129410. LLFloaterTOS needs some post-merge cleanup.
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;
}