summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerjoystick.cpp
diff options
context:
space:
mode:
authorMark Palange <palange@lindenlab.com>2008-10-07 22:49:00 +0000
committerMark Palange <palange@lindenlab.com>2008-10-07 22:49:00 +0000
commit4296542cd062af425d7744c88d6dd2bd00daf532 (patch)
tree8926d4f0bfaa9ed672f4cf90577afcf8e7f44a97 /indra/newview/llviewerjoystick.cpp
parentc9be97fdfcc6a4c6b23a8c90916af54a38d60ab0 (diff)
Roll back of r98854 Accidentally commited merge in progress
Diffstat (limited to 'indra/newview/llviewerjoystick.cpp')
-rw-r--r--indra/newview/llviewerjoystick.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/indra/newview/llviewerjoystick.cpp b/indra/newview/llviewerjoystick.cpp
index 899ad2c0d6..96e6da76b6 100644
--- a/indra/newview/llviewerjoystick.cpp
+++ b/indra/newview/llviewerjoystick.cpp
@@ -386,7 +386,7 @@ void LLViewerJoystick::agentRotate(F32 pitch_inc, F32 yaw_inc)
}
// -----------------------------------------------------------------------------
-void LLViewerJoystick::resetDeltas(S32 axis[])
+void LLViewerJoystick::resetDeltas(S32 axis[], bool flycam_and_build_mode)
{
for (U32 i = 0; i < 6; i++)
{
@@ -394,6 +394,13 @@ void LLViewerJoystick::resetDeltas(S32 axis[])
sDelta[i] = 0.f;
}
+ if (flycam_and_build_mode)
+ {
+ sLastDelta[X_I] /= BUILDMODE_FLYCAM_T_SCALE;
+ sLastDelta[Y_I] /= BUILDMODE_FLYCAM_T_SCALE;
+ sLastDelta[Z_I] /= BUILDMODE_FLYCAM_T_SCALE;
+ }
+
sLastDelta[6] = sDelta[6] = 0.f;
mResetFlag = false;
}
@@ -748,7 +755,7 @@ void LLViewerJoystick::moveFlycam(bool reset)
sFlycamRotation = LLViewerCamera::getInstance()->getQuaternion();
sFlycamZoom = LLViewerCamera::getInstance()->getView();
- resetDeltas(axis);
+ resetDeltas(axis, in_build_mode);
return;
}