From 081f4403ea2a2f8352d480910052bf5032e2e4a5 Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Wed, 12 Dec 2007 06:58:55 +0000 Subject: * Added some simstats to fill the simulator pane of the Statistics monitor. * I stress, this is an initial implementation and the Agents(Child and Root) are definately obviously incorrect. --- OpenSim/Region/Physics/BulletXPlugin/BulletXPlugin.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/Physics/BulletXPlugin') diff --git a/OpenSim/Region/Physics/BulletXPlugin/BulletXPlugin.cs b/OpenSim/Region/Physics/BulletXPlugin/BulletXPlugin.cs index 4b1043a..1760e50 100644 --- a/OpenSim/Region/Physics/BulletXPlugin/BulletXPlugin.cs +++ b/OpenSim/Region/Physics/BulletXPlugin/BulletXPlugin.cs @@ -515,20 +515,26 @@ namespace OpenSim.Region.Physics.BulletXPlugin { } - public override void Simulate(float timeStep) + public override float Simulate(float timeStep) { + float fps = 0; lock (BulletXLock) { //Try to remove garbage RemoveForgottenRigidBodies(); //End of remove MoveAllObjects(timeStep); + + + fps = (timeStep * simulationSubSteps); + ddWorld.StepSimulation(timeStep, simulationSubSteps, timeStep); //Extra Heightmap Validation: BulletX's HeightFieldTerrain somestimes doesn't work so fine. ValidateHeightForAll(); //End heightmap validation. UpdateKineticsForAll(); } + return fps; } private void MoveAllObjects(float timeStep) -- cgit v1.1