From 6bca0c9c9c689b58af71e61c45e29e0c9b4d851f Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Thu, 17 Sep 2015 08:45:52 +0100 Subject: recover bulletS fps math change lost in merge --- OpenSim/Region/PhysicsModules/BulletS/BSScene.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/PhysicsModules/BulletS/BSScene.cs b/OpenSim/Region/PhysicsModules/BulletS/BSScene.cs index 452ce55..b2d5e47 100644 --- a/OpenSim/Region/PhysicsModules/BulletS/BSScene.cs +++ b/OpenSim/Region/PhysicsModules/BulletS/BSScene.cs @@ -762,7 +762,8 @@ namespace OpenSim.Region.PhysicsModule.BulletS // 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. // Multiply by a fixed nominal frame rate to give a rate similar to the simulator (usually 55). - m_simulatedTime += (float)numSubSteps * m_fixedTimeStep * 1000f * NominalFrameRate; +// m_simulatedTime += (float)numSubSteps * m_fixedTimeStep * 1000f * NominalFrameRate; + m_simulatedTime += (float)numSubSteps * m_fixedTimeStep; } // Called by a BSPhysObject to note that it has changed properties and this information @@ -849,7 +850,7 @@ namespace OpenSim.Region.PhysicsModule.BulletS // Return the framerate simulated to give the above returned results. // (Race condition here but this is just bookkeeping so rare mistakes do not merit a lock). - float simTime = m_simulatedTime; + float simTime = m_simulatedTime / timeStep; m_simulatedTime = 0f; return simTime; } -- cgit v1.1