aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs16
1 files changed, 4 insertions, 12 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 64ed6c7..2a25b2b 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -161,11 +161,6 @@ namespace OpenSim.Region.Framework.Scenes
161 /// </remarks> 161 /// </remarks>
162 public float MinFrameTime { get; private set; } 162 public float MinFrameTime { get; private set; }
163 163
164 /// <summary>
165 /// The time of the last frame update.
166 /// </summary>
167 protected DateTime m_lastFrameUpdate = DateTime.UtcNow;
168
169 private int m_update_physics = 1; 164 private int m_update_physics = 1;
170 private int m_update_entitymovement = 1; 165 private int m_update_entitymovement = 1;
171 private int m_update_objects = 1; 166 private int m_update_objects = 1;
@@ -1238,8 +1233,7 @@ namespace OpenSim.Region.Framework.Scenes
1238 } 1233 }
1239 1234
1240 public override void Update() 1235 public override void Update()
1241 { 1236 {
1242 TimeSpan SinceLastFrame = DateTime.UtcNow - m_lastFrameUpdate;
1243 float physicsFPS = 0f; 1237 float physicsFPS = 0f;
1244 1238
1245 int maintc = Util.EnvironmentTickCount(); 1239 int maintc = Util.EnvironmentTickCount();
@@ -1299,7 +1293,8 @@ namespace OpenSim.Region.Framework.Scenes
1299 if (Frame % m_update_physics == 0) 1293 if (Frame % m_update_physics == 0)
1300 { 1294 {
1301 if (m_physics_enabled) 1295 if (m_physics_enabled)
1302 physicsFPS = m_sceneGraph.UpdatePhysics(Math.Max(SinceLastFrame.TotalSeconds, MinFrameTime)); 1296 physicsFPS = m_sceneGraph.UpdatePhysics(MinFrameTime);
1297
1303 if (SynchronizeScene != null) 1298 if (SynchronizeScene != null)
1304 SynchronizeScene(this); 1299 SynchronizeScene(this);
1305 } 1300 }
@@ -1385,6 +1380,7 @@ namespace OpenSim.Region.Framework.Scenes
1385 { 1380 {
1386 LoginsDisabled = false; 1381 LoginsDisabled = false;
1387 } 1382 }
1383
1388 m_sceneGridService.InformNeighborsThatRegionisUp(RequestModuleInterface<INeighbourService>(), RegionInfo); 1384 m_sceneGridService.InformNeighborsThatRegionisUp(RequestModuleInterface<INeighbourService>(), RegionInfo);
1389 } 1385 }
1390 else 1386 else
@@ -1414,10 +1410,6 @@ namespace OpenSim.Region.Framework.Scenes
1414 { 1410 {
1415 m_log.Error("[REGION]: Failed with exception " + e.ToString() + " On Region: " + RegionInfo.RegionName); 1411 m_log.Error("[REGION]: Failed with exception " + e.ToString() + " On Region: " + RegionInfo.RegionName);
1416 } 1412 }
1417 finally
1418 {
1419 m_lastFrameUpdate = DateTime.UtcNow;
1420 }
1421 1413
1422 maintc = Util.EnvironmentTickCountSubtract(maintc); 1414 maintc = Util.EnvironmentTickCountSubtract(maintc);
1423 maintc = (int)(MinFrameTime * 1000) - maintc; 1415 maintc = (int)(MinFrameTime * 1000) - maintc;