summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorMnikolenko ProductEngine <mnikolenko@productengine.com>2016-03-09 15:25:58 +0200
committerMnikolenko ProductEngine <mnikolenko@productengine.com>2016-03-09 15:25:58 +0200
commit9197a8652e49178c63ea208c6c4acf1ca3433659 (patch)
treeaed5906114e6cdcec766b9027f7f6957ef21d223 /indra/newview
parent1a92e103204bf467c1fb9b97927b26b7ad032de7 (diff)
MAINT-6110 FIXED No hovertext (PRIM_TEXT/llSetText) on child prim
Diffstat (limited to 'indra/newview')
-rwxr-xr-xindra/newview/llhudtext.cpp18
1 files changed, 7 insertions, 11 deletions
diff --git a/indra/newview/llhudtext.cpp b/indra/newview/llhudtext.cpp
index 05c8c236e9..52e83fe412 100755
--- a/indra/newview/llhudtext.cpp
+++ b/indra/newview/llhudtext.cpp
@@ -374,7 +374,7 @@ void LLHUDText::updateVisibility()
mVisible = FALSE;
return;
}
-
+
if (vec_from_camera * LLViewerCamera::getInstance()->getAtAxis() <= LLViewerCamera::getInstance()->getNear() + 0.1f + mSourceObject->getVObjRadius())
{
mPositionAgent = LLViewerCamera::getInstance()->getOrigin() + vec_from_camera * ((LLViewerCamera::getInstance()->getNear() + 0.1f) / (vec_from_camera * LLViewerCamera::getInstance()->getAtAxis()));
@@ -384,21 +384,17 @@ void LLHUDText::updateVisibility()
mPositionAgent -= dir_from_camera * mSourceObject->getVObjRadius();
}
- if (!mTextSegments.size())
+ mLastDistance = (mPositionAgent - LLViewerCamera::getInstance()->getOrigin()).magVec();
+
+ if (!mTextSegments.size() || (mDoFade && (mLastDistance > mFadeDistance + mFadeRange)))
{
mVisible = FALSE;
return;
}
- mLastDistance = (mPositionAgent - LLViewerCamera::getInstance()->getOrigin()).magVec();
- F32 obj_dist = dist_vec(mSourceObject->getPositionEdit(), LLViewerCamera::getInstance()->getOrigin());
-
- 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))
+ LLVector3 pos_agent_center = gAgent.getPosAgentFromGlobal(mPositionGlobal) - dir_from_camera;
+ F32 last_distance_center = (pos_agent_center - LLViewerCamera::getInstance()->getOrigin()).magVec();
+ if(last_distance_center > MAX_DRAW_DISTANCE)
{
mVisible = FALSE;
return;