From a86fedd25ffb02c328b0591d16eda1dab797d8f9 Mon Sep 17 00:00:00 2001 From: Robert Adams Date: Wed, 10 Oct 2012 16:51:50 -0700 Subject: [PATCH] BulletSim: normalize physics FPS to 45. --- OpenSim/Region/Physics/BulletSPlugin/BSScene.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs b/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs index 617bdb4b1b..25f8f5feef 100644 --- a/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs @@ -581,8 +581,9 @@ public class BSScene : PhysicsScene, IPhysicsParameters // The physics engine returns the number of milliseconds it simulated this call. // These are summed and normalized to one second and divided by 1000 to give the reported physics FPS. - // Since Bullet normally does 5 or 6 substeps, this will normally sum to about 60 FPS. - return numSubSteps * m_fixedTimeStep * 1000; + // We multiply by 45 to give a recognizable running rate (45 or less). + return numSubSteps * m_fixedTimeStep * 1000 * 45; + // return timeStep * 1000 * 45; } // Something has collided @@ -1300,7 +1301,7 @@ public class BSScene : PhysicsScene, IPhysicsParameters { PhysicsLogging.Write(msg, args); // Add the Flush() if debugging crashes to get all the messages written out. - PhysicsLogging.Flush(); // DEBUG DEBUG DEBUG + // PhysicsLogging.Flush(); } // used to fill in the LocalID when there isn't one public const string DetailLogZero = "0000000000";