Limit physics time dilation to 1.0

0.6.8-post-fixes
John Hurliman 2009-10-28 14:44:05 -07:00
parent b81c829576
commit a069a1ee68
2 changed files with 2 additions and 2 deletions

View File

@ -135,7 +135,7 @@ namespace OpenSim.Region.Framework.Scenes
protected SceneCommunicationService m_sceneGridService;
public bool loginsdisabled = true;
public float TimeDilation
public new float TimeDilation
{
get { return m_sceneGraph.PhysicsScene.TimeDilation; }
}

View File

@ -2672,7 +2672,7 @@ namespace OpenSim.Region.Physics.OdePlugin
//(step_time == 0.004f, there's 250 of those per second. Times the step time/step size
fps = (step_time / ODE_STEPSIZE) * 1000;
m_timeDilation = (step_time / ODE_STEPSIZE) / (0.09375f / ODE_STEPSIZE);
m_timeDilation = Math.Min((step_time / ODE_STEPSIZE) / (0.09375f / ODE_STEPSIZE), 1.0f);
step_time = 0.09375f;