Commits

davep committed b32e840 Draft

MAINT-1270 Fix for flexi prims showing up as discs when first loading.

Reviewed by Stinson.

  • Participants
  • Parent commits 4df67e6

Comments (0)

Files changed (1)

File indra/newview/llflexibleobject.cpp

 	mSimulateRes = 0;
 	mFrameNum = 0;
 	mCollisionSphereRadius = 0.f;
-	mRenderRes = 1;
+	mRenderRes = -1;
 	
 	if(mVO->mDrawable.notNull())
 	{
 		{
 			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)
 				{
 	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)
 	{