diff options
author | Dmitry Zaporozhan <dzaporozhan@productengine.com> | 2009-11-12 19:29:05 +0200 |
---|---|---|
committer | Dmitry Zaporozhan <dzaporozhan@productengine.com> | 2009-11-12 19:29:05 +0200 |
commit | d149b28173c2b255bd1bf1db902368dfbdf3064a (patch) | |
tree | d433c57f07aad0959519f8b88ccd1ed8447af7bf /indra/newview/llagent.cpp | |
parent | 38115eb90b1760025ee299a167f6a9a2311f59ab (diff) | |
parent | 3b7ed8a4e9fdff83f89b49760d281ee5c13c8155 (diff) |
Merge
--HG--
branch : product-engine
Diffstat (limited to 'indra/newview/llagent.cpp')
-rw-r--r-- | indra/newview/llagent.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index 24bdf66c2a..d2c8558f0b 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -2619,9 +2619,9 @@ void LLAgent::updateLookAt(const S32 mouse_x, const S32 mouse_y) { // range from -.5 to .5 F32 x_from_center = - ((F32) mouse_x / (F32) gViewerWindow->getWindowWidth() ) - 0.5f; + ((F32) mouse_x / (F32) gViewerWindow->getWindowWidthScaled() ) - 0.5f; F32 y_from_center = - ((F32) mouse_y / (F32) gViewerWindow->getWindowHeight() ) - 0.5f; + ((F32) mouse_y / (F32) gViewerWindow->getWindowHeightScaled() ) - 0.5f; frameCamera.yaw( - x_from_center * gSavedSettings.getF32("YawFromMousePosition") * DEG_TO_RAD); frameCamera.pitch( - y_from_center * gSavedSettings.getF32("PitchFromMousePosition") * DEG_TO_RAD); @@ -3436,11 +3436,11 @@ F32 LLAgent::calcCustomizeAvatarUIOffset( const LLVector3d& camera_pos_global ) const LLRect& rect = gFloaterCustomize->getRect(); // Move the camera so that the avatar isn't covered up by this floater. - F32 fraction_of_fov = 0.5f - (0.5f * (1.f - llmin(1.f, ((F32)rect.getWidth() / (F32)gViewerWindow->getWindowWidth())))); + F32 fraction_of_fov = 0.5f - (0.5f * (1.f - llmin(1.f, ((F32)rect.getWidth() / (F32)gViewerWindow->getWindowWidthScaled())))); F32 apparent_angle = fraction_of_fov * LLViewerCamera::getInstance()->getView() * LLViewerCamera::getInstance()->getAspect(); // radians F32 offset = tan(apparent_angle); - if( rect.mLeft < (gViewerWindow->getWindowWidth() - rect.mRight) ) + if( rect.mLeft < (gViewerWindow->getWindowWidthScaled() - rect.mRight) ) { // Move the avatar to the right (camera to the left) ui_offset = offset; |