summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorMnikolenko ProductEngine <mnikolenko@productengine.com>2016-01-06 13:06:58 +0200
committerMnikolenko ProductEngine <mnikolenko@productengine.com>2016-01-06 13:06:58 +0200
commitf44b24aadd650a6fdfb498c2bea5c0e48502e758 (patch)
treeeb4af3097de48008c26924d6c4416562276d3645 /indra
parent3eb9a422d70472ef1f51f1df25a7e6910f06cf99 (diff)
MAINT-5851 PRIM_TEXT/llSetText has no upper draw distance limit
Diffstat (limited to 'indra')
-rwxr-xr-xindra/newview/llhudtext.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/indra/newview/llhudtext.cpp b/indra/newview/llhudtext.cpp
index 2c204170f2..3ab89b6e5f 100755
--- a/indra/newview/llhudtext.cpp
+++ b/indra/newview/llhudtext.cpp
@@ -53,6 +53,7 @@ const F32 VERTICAL_PADDING = 12.f;
const F32 BUFFER_SIZE = 2.f;
const F32 HUD_TEXT_MAX_WIDTH = 190.f;
const F32 HUD_TEXT_MAX_WIDTH_NO_BUBBLE = 1000.f;
+const F32 MAX_DRAW_DISTANCE = 64.f;
std::set<LLPointer<LLHUDText> > LLHUDText::sTextObjects;
std::vector<LLPointer<LLHUDText> > LLHUDText::sVisibleTextObjects;
@@ -384,8 +385,8 @@ void LLHUDText::updateVisibility()
}
mLastDistance = (mPositionAgent - LLViewerCamera::getInstance()->getOrigin()).magVec();
-
- if (!mTextSegments.size() || (mDoFade && (mLastDistance > mFadeDistance + mFadeRange)))
+ F32 obj_dist = dist_vec(mSourceObject->getPosition(), LLViewerCamera::getInstance()->getOrigin());
+ if (!mTextSegments.size() || (mDoFade && (mLastDistance > mFadeDistance + mFadeRange)) || (obj_dist > MAX_DRAW_DISTANCE))
{
mVisible = FALSE;
return;