aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/OdePlugin
diff options
context:
space:
mode:
authorMelanie2011-10-25 03:17:59 +0100
committerMelanie2011-10-25 03:17:59 +0100
commit6d4480c1cabdd91d956f9645cae50e9a99bb9d4d (patch)
treecfe24e6fe40801448d423e984da19f4b78b290e0 /OpenSim/Region/Physics/OdePlugin
parentMerge commit '6837e44d0707e501795df2d690c6005f5ba1d591' into bigmerge (diff)
parentGet OdeScene to use passed in time step rather than hard-coded 0.089 (diff)
downloadopensim-SC-6d4480c1cabdd91d956f9645cae50e9a99bb9d4d.zip
opensim-SC-6d4480c1cabdd91d956f9645cae50e9a99bb9d4d.tar.gz
opensim-SC-6d4480c1cabdd91d956f9645cae50e9a99bb9d4d.tar.bz2
opensim-SC-6d4480c1cabdd91d956f9645cae50e9a99bb9d4d.tar.xz
Merge commit '9c430208769ab7fd7877093e278e8fcae02ecef3' into bigmerge
Diffstat (limited to 'OpenSim/Region/Physics/OdePlugin')
-rw-r--r--OpenSim/Region/Physics/OdePlugin/OdeScene.cs45
1 files changed, 23 insertions, 22 deletions
diff --git a/OpenSim/Region/Physics/OdePlugin/OdeScene.cs b/OpenSim/Region/Physics/OdePlugin/OdeScene.cs
index a56a292..1d0c699 100644
--- a/OpenSim/Region/Physics/OdePlugin/OdeScene.cs
+++ b/OpenSim/Region/Physics/OdePlugin/OdeScene.cs
@@ -2640,24 +2640,27 @@ Console.WriteLine("AddPhysicsActorTaint to " + taintedprim.Name);
2640 framecount++; 2640 framecount++;
2641 2641
2642 float fps = 0; 2642 float fps = 0;
2643 //m_log.Info(timeStep.ToString());
2644 step_time += timeStep;
2645
2646 // If We're loaded down by something else,
2647 // or debugging with the Visual Studio project on pause
2648 // skip a few frames to catch up gracefully.
2649 // without shooting the physicsactors all over the place
2650 2643
2651 if (step_time >= m_SkipFramesAtms) 2644 float timeLeft = timeStep;
2652 { 2645
2653 // Instead of trying to catch up, it'll do 5 physics frames only 2646 //m_log.Info(timeStep.ToString());
2654 step_time = ODE_STEPSIZE; 2647// step_time += timeStep;
2655 m_physicsiterations = 5; 2648//
2656 } 2649// // If We're loaded down by something else,
2657 else 2650// // or debugging with the Visual Studio project on pause
2658 { 2651// // skip a few frames to catch up gracefully.
2659 m_physicsiterations = 10; 2652// // without shooting the physicsactors all over the place
2660 } 2653//
2654// if (step_time >= m_SkipFramesAtms)
2655// {
2656// // Instead of trying to catch up, it'll do 5 physics frames only
2657// step_time = ODE_STEPSIZE;
2658// m_physicsiterations = 5;
2659// }
2660// else
2661// {
2662// m_physicsiterations = 10;
2663// }
2661 2664
2662 if (SupportsNINJAJoints) 2665 if (SupportsNINJAJoints)
2663 { 2666 {
@@ -2683,13 +2686,11 @@ Console.WriteLine("AddPhysicsActorTaint to " + taintedprim.Name);
2683 // Figure out the Frames Per Second we're going at. 2686 // Figure out the Frames Per Second we're going at.
2684 //(step_time == 0.004f, there's 250 of those per second. Times the step time/step size 2687 //(step_time == 0.004f, there's 250 of those per second. Times the step time/step size
2685 2688
2686 fps = (step_time / ODE_STEPSIZE) * 1000; 2689 fps = (timeStep / ODE_STEPSIZE) * 1000;
2687 // HACK: Using a time dilation of 1.0 to debug rubberbanding issues 2690 // HACK: Using a time dilation of 1.0 to debug rubberbanding issues
2688 //m_timeDilation = Math.Min((step_time / ODE_STEPSIZE) / (0.09375f / ODE_STEPSIZE), 1.0f); 2691 //m_timeDilation = Math.Min((step_time / ODE_STEPSIZE) / (0.09375f / ODE_STEPSIZE), 1.0f);
2689 2692
2690 step_time = 0.089f; 2693 while (timeLeft > 0.0f)
2691
2692 while (step_time > 0.0f)
2693 { 2694 {
2694 try 2695 try
2695 { 2696 {
@@ -2829,7 +2830,7 @@ Console.WriteLine("AddPhysicsActorTaint to " + taintedprim.Name);
2829 m_log.ErrorFormat("[PHYSICS]: {0}, {1}, {2}", e.Message, e.TargetSite, e); 2830 m_log.ErrorFormat("[PHYSICS]: {0}, {1}, {2}", e.Message, e.TargetSite, e);
2830 } 2831 }
2831 2832
2832 step_time -= ODE_STEPSIZE; 2833 timeLeft -= ODE_STEPSIZE;
2833 } 2834 }
2834 2835
2835 lock (_characters) 2836 lock (_characters)