aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llagent.cpp
diff options
context:
space:
mode:
authorMcCabe Maxsted2011-04-19 16:48:45 -0700
committerMcCabe Maxsted2011-04-19 16:48:45 -0700
commitf51a3fbabdc8d135114c0ec05e078d06d8c5fdcc (patch)
treebf3854524085aab75dd5873e549560ce63cfc757 /linden/indra/newview/llagent.cpp
parentFix #869: Fixed failure path for j2c decode, from Siana Gearz (diff)
parentworkaround crash seemingly specific for win7/64 on Aurora (diff)
downloadmeta-impy-f51a3fbabdc8d135114c0ec05e078d06d8c5fdcc.zip
meta-impy-f51a3fbabdc8d135114c0ec05e078d06d8c5fdcc.tar.gz
meta-impy-f51a3fbabdc8d135114c0ec05e078d06d8c5fdcc.tar.bz2
meta-impy-f51a3fbabdc8d135114c0ec05e078d06d8c5fdcc.tar.xz
Merge remote-tracking branch 'armin/exp' into exp
Diffstat (limited to 'linden/indra/newview/llagent.cpp')
-rw-r--r--linden/indra/newview/llagent.cpp26
1 files changed, 18 insertions, 8 deletions
diff --git a/linden/indra/newview/llagent.cpp b/linden/indra/newview/llagent.cpp
index 44a71da..09d65d1 100644
--- a/linden/indra/newview/llagent.cpp
+++ b/linden/indra/newview/llagent.cpp
@@ -2735,14 +2735,24 @@ void LLAgent::updateLookAt(const S32 mouse_x, const S32 mouse_y)
2735 } 2735 }
2736 else if (cameraThirdPerson()) 2736 else if (cameraThirdPerson())
2737 { 2737 {
2738 // range from -.5 to .5 2738 if (gSavedSettings.getBOOL("HeadFollowsMouse"))
2739 F32 x_from_center = 2739 {
2740 ((F32) mouse_x / (F32) gViewerWindow->getWindowWidth() ) - 0.5f; 2740 // range from -.5 to .5
2741 F32 y_from_center = 2741 F32 x_from_center =
2742 ((F32) mouse_y / (F32) gViewerWindow->getWindowHeight() ) - 0.5f; 2742 ((F32) mouse_x / (F32) gViewerWindow->getWindowWidth() ) - 0.5f;
2743 2743 F32 y_from_center =
2744 frameCamera.yaw( - x_from_center * gSavedSettings.getF32("YawFromMousePosition") * DEG_TO_RAD); 2744 ((F32) mouse_y / (F32) gViewerWindow->getWindowHeight() ) - 0.5f;
2745 frameCamera.pitch( - y_from_center * gSavedSettings.getF32("PitchFromMousePosition") * DEG_TO_RAD); 2745
2746 frameCamera.yaw( - x_from_center * gSavedSettings.getF32("YawFromMousePosition")
2747 * DEG_TO_RAD);
2748 frameCamera.pitch( - y_from_center * gSavedSettings.getF32("PitchFromMousePosition")
2749 * DEG_TO_RAD);
2750 }
2751 else
2752 {
2753 frameCamera.yaw( 0.f );
2754 frameCamera.pitch( 0.f );
2755 }
2746 lookAtType = LOOKAT_TARGET_FREELOOK; 2756 lookAtType = LOOKAT_TARGET_FREELOOK;
2747 } 2757 }
2748 2758