summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-x.hgtags1
-rw-r--r--indra/newview/VIEWER_VERSION.txt2
-rwxr-xr-xindra/newview/llhudtext.cpp18
3 files changed, 9 insertions, 12 deletions
diff --git a/.hgtags b/.hgtags
index a0ff0c07f8..f7163ef138 100755
--- a/.hgtags
+++ b/.hgtags
@@ -512,3 +512,4 @@ e821ef17c6edea4a59997719d8ba416d8c16e143 3.8.5-release
5a5bd148943bfb46cf2ff2ccf376c42dee93d19b 3.8.6-release
ae3297cdd03ab14f19f3811acbc4acd3eb600336 4.0.0-release
759710a9acef61aaf7b69f4bc4a5a913de87ad8a 4.0.1-release
+e9d350764dfbf5a46229e627547ef5c1b1eeef00 4.0.2-release
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;