aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/BulletXPlugin
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Physics/BulletXPlugin')
-rw-r--r--OpenSim/Region/Physics/BulletXPlugin/BulletXPlugin.cs8
1 files changed, 7 insertions, 1 deletions
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
515 { 515 {
516 516
517 } 517 }
518 public override void Simulate(float timeStep) 518 public override float Simulate(float timeStep)
519 { 519 {
520 float fps = 0;
520 lock (BulletXLock) 521 lock (BulletXLock)
521 { 522 {
522 //Try to remove garbage 523 //Try to remove garbage
523 RemoveForgottenRigidBodies(); 524 RemoveForgottenRigidBodies();
524 //End of remove 525 //End of remove
525 MoveAllObjects(timeStep); 526 MoveAllObjects(timeStep);
527
528
529 fps = (timeStep * simulationSubSteps);
530
526 ddWorld.StepSimulation(timeStep, simulationSubSteps, timeStep); 531 ddWorld.StepSimulation(timeStep, simulationSubSteps, timeStep);
527 //Extra Heightmap Validation: BulletX's HeightFieldTerrain somestimes doesn't work so fine. 532 //Extra Heightmap Validation: BulletX's HeightFieldTerrain somestimes doesn't work so fine.
528 ValidateHeightForAll(); 533 ValidateHeightForAll();
529 //End heightmap validation. 534 //End heightmap validation.
530 UpdateKineticsForAll(); 535 UpdateKineticsForAll();
531 } 536 }
537 return fps;
532 } 538 }
533 539
534 private void MoveAllObjects(float timeStep) 540 private void MoveAllObjects(float timeStep)