aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/BulletXPlugin/BulletXPlugin.cs
diff options
context:
space:
mode:
authorTeravus Ovares2007-12-12 06:58:55 +0000
committerTeravus Ovares2007-12-12 06:58:55 +0000
commit081f4403ea2a2f8352d480910052bf5032e2e4a5 (patch)
tree9eeda0d127f84b1e0538ac834e7921a074b6503e /OpenSim/Region/Physics/BulletXPlugin/BulletXPlugin.cs
parent* Patch from justincc to fix Inconsistent automatic mysql table creation - se... (diff)
downloadopensim-SC_OLD-081f4403ea2a2f8352d480910052bf5032e2e4a5.zip
opensim-SC_OLD-081f4403ea2a2f8352d480910052bf5032e2e4a5.tar.gz
opensim-SC_OLD-081f4403ea2a2f8352d480910052bf5032e2e4a5.tar.bz2
opensim-SC_OLD-081f4403ea2a2f8352d480910052bf5032e2e4a5.tar.xz
* 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.
Diffstat (limited to 'OpenSim/Region/Physics/BulletXPlugin/BulletXPlugin.cs')
-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)