diff options
author | Melanie | 2011-10-25 03:17:45 +0100 |
---|---|---|
committer | Melanie | 2011-10-25 03:17:45 +0100 |
commit | 3d0d84aff77302f142fb85a192810f230726c245 (patch) | |
tree | 83d3da718c183ba125c238ff781a39623e4b3a39 /OpenSim | |
parent | Merge commit 'b63ec987b0a1692da4c5e84facf0ea149d4cfe90' into bigmerge (diff) | |
parent | Pass PhysicsScene.Simulate() only the MinFrameTime rather than the useless Ma... (diff) | |
download | opensim-SC_OLD-3d0d84aff77302f142fb85a192810f230726c245.zip opensim-SC_OLD-3d0d84aff77302f142fb85a192810f230726c245.tar.gz opensim-SC_OLD-3d0d84aff77302f142fb85a192810f230726c245.tar.bz2 opensim-SC_OLD-3d0d84aff77302f142fb85a192810f230726c245.tar.xz |
Merge commit '6837e44d0707e501795df2d690c6005f5ba1d591' into bigmerge
Diffstat (limited to 'OpenSim')
-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; |