diff options
author | Palmer Truelson <palmer@lindenlab.com> | 2010-02-23 17:07:18 -0800 |
---|---|---|
committer | Palmer Truelson <palmer@lindenlab.com> | 2010-02-23 17:07:18 -0800 |
commit | 0980df1e0ce99bdafdd4e806cbacad96c71729cc (patch) | |
tree | 20a76a1b07928ac9aa9453765b5c4a92b0b318c7 /indra/newview/llvovolume.cpp | |
parent | 187acf0c3af6d5fee301137a49993fbc75039f38 (diff) | |
parent | da79eb5545ae0604bad357d71b54e2381fc480e8 (diff) |
merge
Diffstat (limited to 'indra/newview/llvovolume.cpp')
-rw-r--r-- | indra/newview/llvovolume.cpp | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index 14bedaa49c..fbb44c8e76 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -603,6 +603,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; @@ -624,6 +627,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; } @@ -1073,7 +1088,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; |