diff options
Diffstat (limited to 'linden/indra/newview/llflexibleobject.cpp')
-rw-r--r-- | linden/indra/newview/llflexibleobject.cpp | 18 |
1 files changed, 10 insertions, 8 deletions
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 | |||
252 | //--------------------------------------------------------------------------------- | 252 | //--------------------------------------------------------------------------------- |
253 | BOOL LLVolumeImplFlexible::doIdleUpdate(LLAgent &agent, LLWorld &world, const F64 &time) | 253 | BOOL LLVolumeImplFlexible::doIdleUpdate(LLAgent &agent, LLWorld &world, const F64 &time) |
254 | { | 254 | { |
255 | if (!gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_FLEXIBLE)) | ||
256 | { | ||
257 | return FALSE; // (we are not initialized or updated) | ||
258 | } | ||
259 | |||
260 | LLFastTimer ftm(LLFastTimer::FTM_FLEXIBLE_UPDATE); | ||
261 | 255 | ||
262 | if (mVO->mDrawable.isNull()) | 256 | if (mVO->mDrawable.isNull()) |
263 | { | 257 | { |
@@ -272,6 +266,8 @@ BOOL LLVolumeImplFlexible::doIdleUpdate(LLAgent &agent, LLWorld &world, const F6 | |||
272 | LLViewerObject* parent = (LLViewerObject*) mVO->getParent(); | 266 | LLViewerObject* parent = (LLViewerObject*) mVO->getParent(); |
273 | parent->mDrawable->mQuietCount = 0; | 267 | parent->mDrawable->mQuietCount = 0; |
274 | } | 268 | } |
269 | |||
270 | LLFastTimer ftm(LLFastTimer::FTM_FLEXIBLE_UPDATE); | ||
275 | 271 | ||
276 | S32 new_res = mAttributes->getSimulateLOD(); | 272 | S32 new_res = mAttributes->getSimulateLOD(); |
277 | 273 | ||
@@ -284,6 +280,8 @@ BOOL LLVolumeImplFlexible::doIdleUpdate(LLAgent &agent, LLWorld &world, const F6 | |||
284 | { | 280 | { |
285 | mRenderRes = FLEXIBLE_OBJECT_MAX_SECTIONS; | 281 | mRenderRes = FLEXIBLE_OBJECT_MAX_SECTIONS; |
286 | } | 282 | } |
283 | |||
284 | |||
287 | // Bottom cap at 1/4 the original number of sections | 285 | // Bottom cap at 1/4 the original number of sections |
288 | if (mRenderRes < mAttributes->getSimulateLOD()-1) | 286 | if (mRenderRes < mAttributes->getSimulateLOD()-1) |
289 | { | 287 | { |
@@ -301,6 +299,10 @@ BOOL LLVolumeImplFlexible::doIdleUpdate(LLAgent &agent, LLWorld &world, const F6 | |||
301 | setAttributesOfAllSections(); | 299 | setAttributesOfAllSections(); |
302 | mInitialized = TRUE; | 300 | mInitialized = TRUE; |
303 | } | 301 | } |
302 | if (!gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_FLEXIBLE)) | ||
303 | { | ||
304 | return FALSE; // (we are not initialized or updated) | ||
305 | } | ||
304 | 306 | ||
305 | if (mVO->mDrawable->isVisible() && | 307 | if (mVO->mDrawable->isVisible() && |
306 | !mVO->mDrawable->isState(LLDrawable::IN_REBUILD_Q1) && | 308 | !mVO->mDrawable->isState(LLDrawable::IN_REBUILD_Q1) && |
@@ -624,7 +626,7 @@ void LLVolumeImplFlexible::onSetScale(const LLVector3& scale, BOOL damped) | |||
624 | 626 | ||
625 | BOOL LLVolumeImplFlexible::doUpdateGeometry(LLDrawable *drawable) | 627 | BOOL LLVolumeImplFlexible::doUpdateGeometry(LLDrawable *drawable) |
626 | { | 628 | { |
627 | LLVOVolume *volume = (LLVOVolume*)mVO; | 629 | LLVOVolume *volume = (LLVOVolume*)mVO.get(); |
628 | 630 | ||
629 | if (volume->mDrawable.isNull()) // Not sure why this is happening, but it is... | 631 | if (volume->mDrawable.isNull()) // Not sure why this is happening, but it is... |
630 | { | 632 | { |
@@ -740,7 +742,7 @@ void LLVolumeImplFlexible::updateRelativeXform() | |||
740 | { | 742 | { |
741 | LLQuaternion delta_rot; | 743 | LLQuaternion delta_rot; |
742 | LLVector3 delta_pos, delta_scale; | 744 | LLVector3 delta_pos, delta_scale; |
743 | LLVOVolume* vo = (LLVOVolume*) mVO; | 745 | LLVOVolume* vo = (LLVOVolume*) mVO.get(); |
744 | 746 | ||
745 | //matrix from local space to parent relative/global space | 747 | //matrix from local space to parent relative/global space |
746 | delta_rot = vo->mDrawable->isSpatialRoot() ? LLQuaternion() : vo->mDrawable->getRotation(); | 748 | delta_rot = vo->mDrawable->isSpatialRoot() ? LLQuaternion() : vo->mDrawable->getRotation(); |