From a408bac29378072fbf36864164149458c978cfcc Mon Sep 17 00:00:00 2001 From: Jacek Antonelli Date: Fri, 15 Aug 2008 23:44:59 -0500 Subject: Second Life viewer sources 1.17.1.0 --- linden/indra/newview/llflexibleobject.cpp | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'linden/indra/newview/llflexibleobject.cpp') diff --git a/linden/indra/newview/llflexibleobject.cpp b/linden/indra/newview/llflexibleobject.cpp index 0dce348..8e4fe91 100644 --- a/linden/indra/newview/llflexibleobject.cpp +++ b/linden/indra/newview/llflexibleobject.cpp @@ -252,12 +252,6 @@ void LLVolumeImplFlexible::onSetVolume(const LLVolumeParams &volume_params, cons //--------------------------------------------------------------------------------- BOOL LLVolumeImplFlexible::doIdleUpdate(LLAgent &agent, LLWorld &world, const F64 &time) { - if (!gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_FLEXIBLE)) - { - return FALSE; // (we are not initialized or updated) - } - - LLFastTimer ftm(LLFastTimer::FTM_FLEXIBLE_UPDATE); if (mVO->mDrawable.isNull()) { @@ -272,6 +266,8 @@ BOOL LLVolumeImplFlexible::doIdleUpdate(LLAgent &agent, LLWorld &world, const F6 LLViewerObject* parent = (LLViewerObject*) mVO->getParent(); parent->mDrawable->mQuietCount = 0; } + + LLFastTimer ftm(LLFastTimer::FTM_FLEXIBLE_UPDATE); S32 new_res = mAttributes->getSimulateLOD(); @@ -284,6 +280,8 @@ BOOL LLVolumeImplFlexible::doIdleUpdate(LLAgent &agent, LLWorld &world, const F6 { mRenderRes = FLEXIBLE_OBJECT_MAX_SECTIONS; } + + // Bottom cap at 1/4 the original number of sections if (mRenderRes < mAttributes->getSimulateLOD()-1) { @@ -301,6 +299,10 @@ BOOL LLVolumeImplFlexible::doIdleUpdate(LLAgent &agent, LLWorld &world, const F6 setAttributesOfAllSections(); mInitialized = TRUE; } + if (!gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_FLEXIBLE)) + { + return FALSE; // (we are not initialized or updated) + } if (mVO->mDrawable->isVisible() && !mVO->mDrawable->isState(LLDrawable::IN_REBUILD_Q1) && @@ -624,7 +626,7 @@ void LLVolumeImplFlexible::onSetScale(const LLVector3& scale, BOOL damped) BOOL LLVolumeImplFlexible::doUpdateGeometry(LLDrawable *drawable) { - LLVOVolume *volume = (LLVOVolume*)mVO; + LLVOVolume *volume = (LLVOVolume*)mVO.get(); if (volume->mDrawable.isNull()) // Not sure why this is happening, but it is... { @@ -740,7 +742,7 @@ void LLVolumeImplFlexible::updateRelativeXform() { LLQuaternion delta_rot; LLVector3 delta_pos, delta_scale; - LLVOVolume* vo = (LLVOVolume*) mVO; + LLVOVolume* vo = (LLVOVolume*) mVO.get(); //matrix from local space to parent relative/global space delta_rot = vo->mDrawable->isSpatialRoot() ? LLQuaternion() : vo->mDrawable->getRotation(); -- cgit v1.1