SH-1329 FIXED Physics are "twitchy" for high-FPS machines

Fixed bug that was messing up time slices for physics.
meow-7.2.2
Loren Shih 2011-04-13 15:13:10 -04:00
parent c60be7adf2
commit 0cc7d4e0e3
1 changed files with 8 additions and 1 deletions

View File

@ -451,7 +451,14 @@ BOOL LLPhysicsMotion::onUpdate(F32 time)
//
const F32 time_delta = time - mLastTime;
if (time_delta > 3.0 || time_delta <= 0.01)
// Don't update too frequently, to avoid precision errors from small time slices.
if (time_delta <= .01)
{
return FALSE;
}
if (time_delta > 3.0)
{
mLastTime = time;
return FALSE;