diff options
author | Mnikolenko ProductEngine <mnikolenko@productengine.com> | 2016-02-23 12:08:29 +0200 |
---|---|---|
committer | Mnikolenko ProductEngine <mnikolenko@productengine.com> | 2016-02-23 12:08:29 +0200 |
commit | 35b499a0bec95b5a9f0ce8d85d85d6a3c2ae5283 (patch) | |
tree | d80320b942c58634e90761df2f58ecb43ce50011 | |
parent | b1d8df9ea2ce440b0cb94e87a8816426f99c8336 (diff) |
MAINT-6110 Show hovertext on attached objects
-rwxr-xr-x | indra/newview/llhudtext.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/indra/newview/llhudtext.cpp b/indra/newview/llhudtext.cpp index c87e2fb658..05c8c236e9 100755 --- a/indra/newview/llhudtext.cpp +++ b/indra/newview/llhudtext.cpp @@ -384,11 +384,21 @@ void LLHUDText::updateVisibility() mPositionAgent -= dir_from_camera * mSourceObject->getVObjRadius(); } - mLastDistance = (mPositionAgent - LLViewerCamera::getInstance()->getOrigin()).magVec(); + if (!mTextSegments.size()) + { + mVisible = FALSE; + return; + } + mLastDistance = (mPositionAgent - LLViewerCamera::getInstance()->getOrigin()).magVec(); F32 obj_dist = dist_vec(mSourceObject->getPositionEdit(), LLViewerCamera::getInstance()->getOrigin()); - if (!mTextSegments.size() || (mDoFade && (mLastDistance > mFadeDistance + mFadeRange)) || (obj_dist > MAX_DRAW_DISTANCE)) + if(mSourceObject->isAttachment()) + { + LLViewerObject* parent = (LLViewerObject*)mSourceObject->getRoot(); + obj_dist = dist_vec(parent->getPositionEdit(), LLViewerCamera::getInstance()->getOrigin()); + } + if ((mDoFade && (mLastDistance > mFadeDistance + mFadeRange)) || (obj_dist > MAX_DRAW_DISTANCE)) { mVisible = FALSE; return; |