summaryrefslogtreecommitdiff
path: root/indra/newview/llvovolume.cpp
diff options
context:
space:
mode:
authorTofu Linden <tofu.linden@lindenlab.com>2010-02-13 12:49:25 +0000
committerTofu Linden <tofu.linden@lindenlab.com>2010-02-13 12:49:25 +0000
commitfb994141dae9ce4357bdc37217e92631aeb943e3 (patch)
tree896386c0a047bff47fb0830f7da163ded34aaff7 /indra/newview/llvovolume.cpp
parentf0062fa41ae8849235a59808e28998d224a88b52 (diff)
parent827c1adc917d832b577b37e37b0eb3f26705c29d (diff)
resolve.
Diffstat (limited to 'indra/newview/llvovolume.cpp')
-rw-r--r--indra/newview/llvovolume.cpp17
1 files changed, 16 insertions, 1 deletions
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index 4f0f3f3c45..e95c7f411c 100644
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -613,6 +613,9 @@ BOOL LLVOVolume::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time)
{
LLViewerObject::idleUpdate(agent, world, time);
+ static LLFastTimer::DeclareTimer ftm("Volume");
+ LLFastTimer t(ftm);
+
if (mDead || mDrawable.isNull())
{
return TRUE;
@@ -634,6 +637,18 @@ BOOL LLVOVolume::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time)
mVolumeImpl->doIdleUpdate(agent, world, time);
}
+ const S32 MAX_ACTIVE_OBJECT_QUIET_FRAMES = 40;
+
+ if (mDrawable->isActive())
+ {
+ if (mDrawable->isRoot() &&
+ mDrawable->mQuietCount++ > MAX_ACTIVE_OBJECT_QUIET_FRAMES &&
+ (!mDrawable->getParent() || !mDrawable->getParent()->isActive()))
+ {
+ mDrawable->makeStatic();
+ }
+ }
+
return TRUE;
}
@@ -1134,7 +1149,7 @@ BOOL LLVOVolume::calcLOD()
S32 cur_detail = 0;
F32 radius = getVolume()->mLODScaleBias.scaledVec(getScale()).length();
- F32 distance = llmin(mDrawable->mDistanceWRTCamera, MAX_LOD_DISTANCE);
+ F32 distance = mDrawable->mDistanceWRTCamera; //llmin(mDrawable->mDistanceWRTCamera, MAX_LOD_DISTANCE);
distance *= sDistanceFactor;
F32 rampDist = LLVOVolume::sLODFactor * 2;