From 8ed056fde9fe5fc9755158013a5cb8be73066e2c Mon Sep 17 00:00:00 2001 From: Adam Moss Date: Sat, 20 Jun 2009 09:17:56 +0000 Subject: svn merge -r124872:124873 svn+ssh://svn.lindenlab.com/svn/linden/branches/viewer/viewer-1.23.threefour-merge-1a QAR-1592 Merge of changes between 1.23 RC2 and 1.23 Final to trunk --- indra/newview/llagent.cpp | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'indra/newview/llagent.cpp') diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index 07503404dc..cc443d05c0 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -1319,14 +1319,19 @@ LLQuaternion LLAgent::getQuat() const //----------------------------------------------------------------------------- LLVector3 LLAgent::calcFocusOffset(LLViewerObject *object, LLVector3 original_focus_point, S32 x, S32 y) { - // calculate offset based on view direction - BOOL is_avatar = object->isAvatar(); - // since the animation system allows the avatars facing and position to deviate from its nominal LLViewerObject/LLDrawable transform - // calculate the focus-specific orientation for avatars based off the pelvis joint - // NOTE: pelvis no longer good candidate, removed. DEV-30589 LLMatrix4 obj_matrix = object->getRenderMatrix(); LLQuaternion obj_rot = object->getRenderRotation(); LLVector3 obj_pos = object->getRenderPosition(); + + BOOL is_avatar = object->isAvatar(); + // if is avatar - don't do any funk heuristics to position the focal point + // see DEV-30589 + if (is_avatar) + { + return original_focus_point - obj_pos; + } + + LLQuaternion inv_obj_rot = ~obj_rot; // get inverse of rotation LLVector3 object_extents = object->getScale(); // make sure they object extents are non-zero -- cgit v1.2.3