summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorAndreyL ProductEngine <alihatskiy@productengine.com>2016-03-17 21:48:41 +0200
committerAndreyL ProductEngine <alihatskiy@productengine.com>2016-03-17 21:48:41 +0200
commit18cd32443a552e4f115d1b2913f262b385766cdf (patch)
treed8594fb4d7507301eb4ff5919231c5d24128cb0b /indra
parentef73114ede629198258ee4830d0df8f96e5eb477 (diff)
parent4aae7b51616c0963af4668442bdb5bfaba8c5044 (diff)
Merged in lindenlab/viewer-release
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/VIEWER_VERSION.txt2
-rwxr-xr-xindra/newview/llhudtext.cpp18
2 files changed, 8 insertions, 12 deletions
diff --git a/indra/newview/VIEWER_VERSION.txt b/indra/newview/VIEWER_VERSION.txt
index 4d54daddb6..c4e41f9459 100644
--- a/indra/newview/VIEWER_VERSION.txt
+++ b/indra/newview/VIEWER_VERSION.txt
@@ -1 +1 @@
-4.0.2
+4.0.3
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;