diff options
Merge commit '6837e44d0707e501795df2d690c6005f5ba1d591' into bigmerge
Diffstat (limited to 'OpenSim/Region/Framework/Scenes')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.cs | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index cabba04..b9e50c5 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -164,11 +164,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
164 | /// </remarks> | 164 | /// </remarks> |
165 | public float MinFrameTime { get; private set; } | 165 | public float MinFrameTime { get; private set; } |
166 | 166 | ||
167 | /// <summary> | ||
168 | /// The time of the last frame update. | ||
169 | /// </summary> | ||
170 | protected DateTime m_lastFrameUpdate = DateTime.UtcNow; | ||
171 | |||
172 | private int m_update_physics = 1; | 167 | private int m_update_physics = 1; |
173 | private int m_update_entitymovement = 1; | 168 | private int m_update_entitymovement = 1; |
174 | private int m_update_objects = 1; | 169 | private int m_update_objects = 1; |
@@ -1264,8 +1259,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1264 | } | 1259 | } |
1265 | 1260 | ||
1266 | public override void Update() | 1261 | public override void Update() |
1267 | { | 1262 | { |
1268 | TimeSpan SinceLastFrame = DateTime.UtcNow - m_lastFrameUpdate; | ||
1269 | float physicsFPS = 0f; | 1263 | float physicsFPS = 0f; |
1270 | 1264 | ||
1271 | int maintc = Util.EnvironmentTickCount(); | 1265 | int maintc = Util.EnvironmentTickCount(); |
@@ -1325,7 +1319,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
1325 | if (Frame % m_update_physics == 0) | 1319 | if (Frame % m_update_physics == 0) |
1326 | { | 1320 | { |
1327 | if (m_physics_enabled) | 1321 | if (m_physics_enabled) |
1328 | physicsFPS = m_sceneGraph.UpdatePhysics(Math.Max(SinceLastFrame.TotalSeconds, MinFrameTime)); | 1322 | physicsFPS = m_sceneGraph.UpdatePhysics(MinFrameTime); |
1323 | |||
1329 | if (SynchronizeScene != null) | 1324 | if (SynchronizeScene != null) |
1330 | SynchronizeScene(this); | 1325 | SynchronizeScene(this); |
1331 | } | 1326 | } |
@@ -1418,6 +1413,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1418 | { | 1413 | { |
1419 | LoginsDisabled = false; | 1414 | LoginsDisabled = false; |
1420 | } | 1415 | } |
1416 | |||
1421 | m_sceneGridService.InformNeighborsThatRegionisUp(RequestModuleInterface<INeighbourService>(), RegionInfo); | 1417 | m_sceneGridService.InformNeighborsThatRegionisUp(RequestModuleInterface<INeighbourService>(), RegionInfo); |
1422 | } | 1418 | } |
1423 | else | 1419 | else |
@@ -1447,10 +1443,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
1447 | { | 1443 | { |
1448 | m_log.Error("[REGION]: Failed with exception " + e.ToString() + " On Region: " + RegionInfo.RegionName); | 1444 | m_log.Error("[REGION]: Failed with exception " + e.ToString() + " On Region: " + RegionInfo.RegionName); |
1449 | } | 1445 | } |
1450 | finally | ||
1451 | { | ||
1452 | m_lastFrameUpdate = DateTime.UtcNow; | ||
1453 | } | ||
1454 | 1446 | ||
1455 | maintc = Util.EnvironmentTickCountSubtract(maintc); | 1447 | maintc = Util.EnvironmentTickCountSubtract(maintc); |
1456 | maintc = (int)(MinFrameTime * 1000) - maintc; | 1448 | maintc = (int)(MinFrameTime * 1000) - maintc; |