Commits

Stinson Linden committed 4f34824

MAINT-1890 FIX Removing previous hacky fix for this issue. The better solution is to clamp the update_period to a reasonable number of frames (32).

Comments (0)

Files changed (1)

indra/newview/llflexibleobject.cpp

 //static
 void LLVolumeImplFlexible::updateClass()
 {
-	// XXX stinson 11/13/2012 : This hack removes the optimization for limiting the number of flexi-prims
-	// updated.  With the optimization, flexi-prims attached to the users avatar were not being
-	// animated correctly immediately following teleport.  With the optimization removed, the bug went away.
-#define XXX_STINSON_MAINT_1890_HACK_FIX 1
-#if XXX_STINSON_MAINT_1890_HACK_FIX
-	for (std::vector<LLVolumeImplFlexible*>::iterator iter = sInstanceList.begin();
-		iter != sInstanceList.end();
-		++iter)
-	{
-		(*iter)->doIdleUpdate();
-	}
-#else // XXX_STINSON_MAINT_1890_HACK_FIX
 	std::vector<S32>::iterator delay_iter = sUpdateDelay.begin();
 
 	for (std::vector<LLVolumeImplFlexible*>::iterator iter = sInstanceList.begin();
 		}
 		++delay_iter;
 	}
-#endif // XXX_STINSON_MAINT_1890_HACK_FIX
 }
 
 LLVector3 LLVolumeImplFlexible::getFramePosition() const
 				F32 pixel_area = mVO->getPixelArea();
 
 				U32 update_period = (U32) (LLViewerCamera::getInstance()->getScreenPixelArea()*0.01f/(pixel_area*(sUpdateFactor+1.f)))+1;
+				// MAINT-1890 Clamp the update period to ensure that the update_period is no greater than 32 frames
+				update_period = llclamp(update_period, 0U, 32U);
 
 				if	(visible)
 				{