summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2012-11-20 16:50:23 -0600
committerDave Parks <davep@lindenlab.com>2012-11-20 16:50:23 -0600
commit8db983fb8095f25873b8317fd1f4764abce4a31b (patch)
treec3de21dc05ade05d195a5def9829a9677498fc69 /indra/newview
parentf5b4a0af6415711f4950ad9ef288490caee5cf4f (diff)
MAINT-1270 Fix for flexi prims showing up as discs when first loading.
Reviewed by Stinson.
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llflexibleobject.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/indra/newview/llflexibleobject.cpp b/indra/newview/llflexibleobject.cpp
index a37e27363f..ade469e50d 100644
--- a/indra/newview/llflexibleobject.cpp
+++ b/indra/newview/llflexibleobject.cpp
@@ -66,7 +66,7 @@ LLVolumeImplFlexible::LLVolumeImplFlexible(LLViewerObject* vo, LLFlexibleObjectD
mSimulateRes = 0;
mFrameNum = 0;
mCollisionSphereRadius = 0.f;
- mRenderRes = 1;
+ mRenderRes = -1;
if(mVO->mDrawable.notNull())
{
@@ -350,16 +350,17 @@ void LLVolumeImplFlexible::doIdleUpdate()
{
bool visible = drawablep->isVisible();
- if ((mSimulateRes == 0) && visible)
+ if (mRenderRes == -1)
{
updateRenderRes();
gPipeline.markRebuild(drawablep, LLDrawable::REBUILD_POSITION, FALSE);
+ sUpdateDelay[mInstanceIndex] = 0;
}
else
{
F32 pixel_area = mVO->getPixelArea();
- U32 update_period = (U32) (LLViewerCamera::getInstance()->getScreenPixelArea()*0.01f/(pixel_area*(sUpdateFactor+1.f)))+1;
+ U32 update_period = (U32) (llmax((S32) (LLViewerCamera::getInstance()->getScreenPixelArea()*0.01f/(pixel_area*(sUpdateFactor+1.f))),0)+1);
if (visible)
{
@@ -639,6 +640,7 @@ void LLVolumeImplFlexible::doFlexibleUpdate()
mSection[i].mdPosition = (mSection[i].mPosition - mSection[i-1].mPosition) * inv_section_length;
// Create points
+ llassert(mRenderRes > -1)
S32 num_render_sections = 1<<mRenderRes;
if (path->getPathLength() != num_render_sections+1)
{