Limit physics time dilation to 1.0
parent
b81c829576
commit
a069a1ee68
|
@ -135,7 +135,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
protected SceneCommunicationService m_sceneGridService;
|
protected SceneCommunicationService m_sceneGridService;
|
||||||
public bool loginsdisabled = true;
|
public bool loginsdisabled = true;
|
||||||
|
|
||||||
public float TimeDilation
|
public new float TimeDilation
|
||||||
{
|
{
|
||||||
get { return m_sceneGraph.PhysicsScene.TimeDilation; }
|
get { return m_sceneGraph.PhysicsScene.TimeDilation; }
|
||||||
}
|
}
|
||||||
|
|
|
@ -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
|
//(step_time == 0.004f, there's 250 of those per second. Times the step time/step size
|
||||||
|
|
||||||
fps = (step_time / ODE_STEPSIZE) * 1000;
|
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;
|
step_time = 0.09375f;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue