aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework
diff options
context:
space:
mode:
authorUbitUmarov2012-03-21 02:45:33 +0000
committerUbitUmarov2012-03-21 02:45:33 +0000
commit312f0c69703e5914f377fd05871319c1ed6f3abf (patch)
tree29703861d132c793ec3bbcfbb202006ff6c53415 /OpenSim/Region/Framework
parentChanges of PrimShapeType should now work with UbitOde ( almost untested ) (diff)
parentMerge branch 'master' into careminster (diff)
downloadopensim-SC_OLD-312f0c69703e5914f377fd05871319c1ed6f3abf.zip
opensim-SC_OLD-312f0c69703e5914f377fd05871319c1ed6f3abf.tar.gz
opensim-SC_OLD-312f0c69703e5914f377fd05871319c1ed6f3abf.tar.bz2
opensim-SC_OLD-312f0c69703e5914f377fd05871319c1ed6f3abf.tar.xz
Merge branch 'master' of ssh://3dhosting.de/var/git/careminster into ubitwork
Diffstat (limited to 'OpenSim/Region/Framework')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs27
1 files changed, 17 insertions, 10 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 2a511e4..44ee453 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -193,7 +193,11 @@ namespace OpenSim.Region.Framework.Scenes
193 private int backupMS; 193 private int backupMS;
194 private int terrainMS; 194 private int terrainMS;
195 private int landMS; 195 private int landMS;
196 private int lastCompletedFrame; 196
197 /// <summary>
198 /// Tick at which the last frame was processed.
199 /// </summary>
200 private int m_lastFrameTick;
197 201
198 public bool CombineRegions = false; 202 public bool CombineRegions = false;
199 /// <summary> 203 /// <summary>
@@ -484,7 +488,7 @@ namespace OpenSim.Region.Framework.Scenes
484 public int MonitorBackupTime { get { return backupMS; } } 488 public int MonitorBackupTime { get { return backupMS; } }
485 public int MonitorTerrainTime { get { return terrainMS; } } 489 public int MonitorTerrainTime { get { return terrainMS; } }
486 public int MonitorLandTime { get { return landMS; } } 490 public int MonitorLandTime { get { return landMS; } }
487 public int MonitorLastFrameTick { get { return lastCompletedFrame; } } 491 public int MonitorLastFrameTick { get { return m_lastFrameTick; } }
488 492
489 public UpdatePrioritizationSchemes UpdatePrioritizationScheme { get { return m_priorityScheme; } } 493 public UpdatePrioritizationSchemes UpdatePrioritizationScheme { get { return m_priorityScheme; } }
490 public bool IsReprioritizationEnabled { get { return m_reprioritizationEnabled; } } 494 public bool IsReprioritizationEnabled { get { return m_reprioritizationEnabled; } }
@@ -1228,9 +1232,6 @@ namespace OpenSim.Region.Framework.Scenes
1228 1232
1229 while (!shuttingdown) 1233 while (!shuttingdown)
1230 Update(-1); 1234 Update(-1);
1231
1232 m_lastUpdate = Util.EnvironmentTickCount();
1233 m_firstHeartbeat = false;
1234 } 1235 }
1235 finally 1236 finally
1236 { 1237 {
@@ -1250,6 +1251,7 @@ namespace OpenSim.Region.Framework.Scenes
1250 1251
1251 float physicsFPS = 0f; 1252 float physicsFPS = 0f;
1252 int tmpPhysicsMS, tmpPhysicsMS2, tmpAgentMS, tmpTempOnRezMS, evMS, backMS, terMS; 1253 int tmpPhysicsMS, tmpPhysicsMS2, tmpAgentMS, tmpTempOnRezMS, evMS, backMS, terMS;
1254 int previousFrameTick;
1253 int maintc; 1255 int maintc;
1254 List<Vector3> coarseLocations; 1256 List<Vector3> coarseLocations;
1255 List<UUID> avatarUUIDs; 1257 List<UUID> avatarUUIDs;
@@ -1353,10 +1355,9 @@ namespace OpenSim.Region.Framework.Scenes
1353 // UpdateLand(); 1355 // UpdateLand();
1354 // landMS = Util.EnvironmentTickCountSubtract(ldMS); 1356 // landMS = Util.EnvironmentTickCountSubtract(ldMS);
1355 //} 1357 //}
1356 1358
1357 frameMS = Util.EnvironmentTickCountSubtract(maintc); 1359 frameMS = Util.EnvironmentTickCountSubtract(maintc);
1358 otherMS = tempOnRezMS + eventMS + backupMS + terrainMS + landMS; 1360 otherMS = tempOnRezMS + eventMS + backupMS + terrainMS + landMS;
1359 lastCompletedFrame = Util.EnvironmentTickCount();
1360 1361
1361 // if (Frame%m_update_avatars == 0) 1362 // if (Frame%m_update_avatars == 0)
1362 // UpdateInWorldTime(); 1363 // UpdateInWorldTime();
@@ -1426,7 +1427,9 @@ namespace OpenSim.Region.Framework.Scenes
1426 // Tell the watchdog that this thread is still alive 1427 // Tell the watchdog that this thread is still alive
1427 Watchdog.UpdateThread(); 1428 Watchdog.UpdateThread();
1428 1429
1429 maintc = Util.EnvironmentTickCountSubtract(maintc); 1430// previousFrameTick = m_lastFrameTick;
1431 m_lastFrameTick = Util.EnvironmentTickCount();
1432 maintc = Util.EnvironmentTickCountSubtract(m_lastFrameTick, maintc);
1430 maintc = (int)(MinFrameTime * 1000) - maintc; 1433 maintc = (int)(MinFrameTime * 1000) - maintc;
1431 1434
1432 m_lastUpdate = Util.EnvironmentTickCount(); 1435 m_lastUpdate = Util.EnvironmentTickCount();
@@ -1435,10 +1438,14 @@ namespace OpenSim.Region.Framework.Scenes
1435 if (maintc > 0) 1438 if (maintc > 0)
1436 Thread.Sleep(maintc); 1439 Thread.Sleep(maintc);
1437 1440
1438// if (frameMS > (int)(MinFrameTime * 1000)) 1441 m_lastUpdate = Util.EnvironmentTickCount();
1442 m_firstHeartbeat = false;
1443
1444 // Optionally warn if a frame takes double the amount of time that it should.
1445// if (Util.EnvironmentTickCountSubtract(m_lastFrameTick, previousFrameTick) > (int)(MinFrameTime * 1000 * 2))
1439// m_log.WarnFormat( 1446// m_log.WarnFormat(
1440// "[SCENE]: Frame took {0} ms (desired max {1} ms) in {2}", 1447// "[SCENE]: Frame took {0} ms (desired max {1} ms) in {2}",
1441// frameMS, 1448// Util.EnvironmentTickCountSubtract(m_lastFrameTick, previousFrameTick),
1442// MinFrameTime * 1000, 1449// MinFrameTime * 1000,
1443// RegionInfo.RegionName); 1450// RegionInfo.RegionName);
1444 } 1451 }