diff options
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/Scene.cs')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/Scene.cs | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index 6b4f377..b797cc3 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs | |||
@@ -69,7 +69,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
69 | public InnerScene m_innerScene; | 69 | public InnerScene m_innerScene; |
70 | 70 | ||
71 | private Random Rand = new Random(); | 71 | private Random Rand = new Random(); |
72 | private uint _primCount = 702000; | 72 | private uint _primCount = 720000; |
73 | private readonly Mutex _primAllocateMutex = new Mutex(false); | 73 | private readonly Mutex _primAllocateMutex = new Mutex(false); |
74 | 74 | ||
75 | private int m_timePhase = 24; | 75 | private int m_timePhase = 24; |
@@ -113,7 +113,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
113 | 113 | ||
114 | protected int m_fps = 10; | 114 | protected int m_fps = 10; |
115 | protected int m_frame = 0; | 115 | protected int m_frame = 0; |
116 | protected float m_timespan = 0.1f; | 116 | protected float m_timespan = 0.089f; |
117 | protected DateTime m_lastupdate = DateTime.Now; | 117 | protected DateTime m_lastupdate = DateTime.Now; |
118 | 118 | ||
119 | protected float m_timedilation = 1.0f; | 119 | protected float m_timedilation = 1.0f; |
@@ -750,8 +750,17 @@ namespace OpenSim.Region.Environment.Scenes | |||
750 | finally | 750 | finally |
751 | { | 751 | { |
752 | updateLock.ReleaseMutex(); | 752 | updateLock.ReleaseMutex(); |
753 | // Get actual time dilation | ||
754 | float tmpval = (m_timespan / (float)SinceLastFrame.TotalSeconds); | ||
753 | 755 | ||
754 | m_timedilation = m_timespan / (float)SinceLastFrame.TotalSeconds; | 756 | // If actual time dilation is greater then one, we're catching up, so subtract |
757 | // the amount that's greater then 1 from the time dilation | ||
758 | if (tmpval > 1.0) | ||
759 | { | ||
760 | tmpval = tmpval - (tmpval - 1.0f); | ||
761 | } | ||
762 | m_timedilation = tmpval; | ||
763 | |||
755 | m_lastupdate = DateTime.Now; | 764 | m_lastupdate = DateTime.Now; |
756 | } | 765 | } |
757 | } | 766 | } |