mirror of
https://github.com/opensim/opensim.git
synced 2026-08-09 02:36:00 +08:00
Limit physics time dilation to 1.0
This commit is contained in:
@@ -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; }
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user