diff options
author | AndreyL ProductEngine <alihatskiy@productengine.com> | 2016-03-17 21:48:41 +0200 |
---|---|---|
committer | AndreyL ProductEngine <alihatskiy@productengine.com> | 2016-03-17 21:48:41 +0200 |
commit | 18cd32443a552e4f115d1b2913f262b385766cdf (patch) | |
tree | d8594fb4d7507301eb4ff5919231c5d24128cb0b | |
parent | ef73114ede629198258ee4830d0df8f96e5eb477 (diff) | |
parent | 4aae7b51616c0963af4668442bdb5bfaba8c5044 (diff) |
Merged in lindenlab/viewer-release
-rwxr-xr-x | .hgtags | 1 | ||||
-rw-r--r-- | indra/newview/VIEWER_VERSION.txt | 2 | ||||
-rwxr-xr-x | indra/newview/llhudtext.cpp | 18 |
3 files changed, 9 insertions, 12 deletions
@@ -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; |