From a069a1ee683f67405ae66205662bb8129087030b Mon Sep 17 00:00:00 2001 From: John Hurliman Date: Wed, 28 Oct 2009 14:44:05 -0700 Subject: Limit physics time dilation to 1.0 --- OpenSim/Region/Framework/Scenes/Scene.cs | 2 +- OpenSim/Region/Physics/OdePlugin/OdePlugin.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 3b8cd1e..8b0431c 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -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; } } diff --git a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs index 6ca415b..3fdf9ea 100644 --- a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs +++ b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs @@ -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; -- cgit v1.1