diff options
author | UbitUmarov | 2017-06-07 20:12:49 +0100 |
---|---|---|
committer | UbitUmarov | 2017-06-07 20:12:49 +0100 |
commit | 7bea4f1578751e2c6f09aafcb3975133145ff306 (patch) | |
tree | 1a803b593cd72d596fa2d84a0269c34290d9f72f /OpenSim | |
parent | some changes on pollevent (diff) | |
parent | so no real need for Maintenance thread.. so removed (diff) | |
download | opensim-SC-7bea4f1578751e2c6f09aafcb3975133145ff306.zip opensim-SC-7bea4f1578751e2c6f09aafcb3975133145ff306.tar.gz opensim-SC-7bea4f1578751e2c6f09aafcb3975133145ff306.tar.bz2 opensim-SC-7bea4f1578751e2c6f09aafcb3975133145ff306.tar.xz |
Merge branch 'master' into httptests
Diffstat (limited to 'OpenSim')
-rwxr-xr-x | OpenSim/Region/Framework/Scenes/Scene.cs | 191 | ||||
-rw-r--r-- | OpenSim/Region/OptionalModules/World/SceneCommands/SceneCommandsModule.cs | 90 |
2 files changed, 18 insertions, 263 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 826cda1..e1e06d0 100755 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -257,37 +257,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
257 | public bool m_useFlySlow; | 257 | public bool m_useFlySlow; |
258 | public bool m_useTrashOnDelete = true; | 258 | public bool m_useTrashOnDelete = true; |
259 | 259 | ||
260 | /// <summary> | 260 | protected float m_defaultDrawDistance = 255f; |
261 | /// Temporarily setting to trigger appearance resends at 60 second intervals. | ||
262 | /// </summary> | ||
263 | public bool SendPeriodicAppearanceUpdates { get; set; } | ||
264 | |||
265 | /// <summary> | ||
266 | /// How much a root agent has to change position before updates are sent to viewers. | ||
267 | /// </summary> | ||
268 | public float RootPositionUpdateTolerance { get; set; } | ||
269 | |||
270 | /// <summary> | ||
271 | /// How much a root agent has to rotate before updates are sent to viewers. | ||
272 | /// </summary> | ||
273 | public float RootRotationUpdateTolerance { get; set; } | ||
274 | |||
275 | /// <summary> | ||
276 | /// How much a root agent has to change velocity before updates are sent to viewers. | ||
277 | /// </summary> | ||
278 | public float RootVelocityUpdateTolerance { get; set; } | ||
279 | |||
280 | /// <summary> | ||
281 | /// If greater than 1, we only send terse updates to other root agents on every n updates. | ||
282 | /// </summary> | ||
283 | public int RootTerseUpdatePeriod { get; set; } | ||
284 | |||
285 | /// <summary> | ||
286 | /// If greater than 1, we only send terse updates to child agents on every n updates. | ||
287 | /// </summary> | ||
288 | public int ChildTerseUpdatePeriod { get; set; } | ||
289 | |||
290 | protected float m_defaultDrawDistance = 255f; | ||
291 | protected float m_defaultCullingDrawDistance = 16f; | 261 | protected float m_defaultCullingDrawDistance = 16f; |
292 | public float DefaultDrawDistance | 262 | public float DefaultDrawDistance |
293 | { | 263 | { |
@@ -376,11 +346,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
376 | } | 346 | } |
377 | 347 | ||
378 | /// <summary> | 348 | /// <summary> |
379 | /// Current maintenance run number | ||
380 | /// </summary> | ||
381 | public uint MaintenanceRun { get; private set; } | ||
382 | |||
383 | /// <summary> | ||
384 | /// Frame time | 349 | /// Frame time |
385 | /// </remarks> | 350 | /// </remarks> |
386 | public float FrameTime { get; private set; } | 351 | public float FrameTime { get; private set; } |
@@ -391,14 +356,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
391 | // see SimStatsReporter.cs | 356 | // see SimStatsReporter.cs |
392 | public bool Normalized55FPS { get; private set; } | 357 | public bool Normalized55FPS { get; private set; } |
393 | 358 | ||
394 | /// <summary> | ||
395 | /// The minimum length of time in seconds that will be taken for a scene frame. | ||
396 | /// </summary> | ||
397 | /// <remarks> | ||
398 | /// Always derived from MinFrameTicks. | ||
399 | /// </remarks> | ||
400 | public float MinMaintenanceTime { get; private set; } | ||
401 | |||
402 | private int m_update_physics = 1; | 359 | private int m_update_physics = 1; |
403 | private int m_update_entitymovement = 1; | 360 | private int m_update_entitymovement = 1; |
404 | private int m_update_objects = 1; | 361 | private int m_update_objects = 1; |
@@ -407,9 +364,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
407 | private int m_update_backup = 200; | 364 | private int m_update_backup = 200; |
408 | 365 | ||
409 | private int m_update_terrain = 1000; | 366 | private int m_update_terrain = 1000; |
410 | private int m_update_land = 10; | ||
411 | 367 | ||
412 | private int m_update_coarse_locations = 50; | 368 | private int m_update_coarse_locations = 5; |
413 | private int m_update_temp_cleaning = 180; | 369 | private int m_update_temp_cleaning = 180; |
414 | 370 | ||
415 | private float agentMS; | 371 | private float agentMS; |
@@ -429,11 +385,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
429 | private int m_lastFrameTick; | 385 | private int m_lastFrameTick; |
430 | 386 | ||
431 | /// <summary> | 387 | /// <summary> |
432 | /// Tick at which the last maintenance run occurred. | ||
433 | /// </summary> | ||
434 | private int m_lastMaintenanceTick; | ||
435 | |||
436 | /// <summary> | ||
437 | /// Total script execution time (in Stopwatch Ticks) since the last frame | 388 | /// Total script execution time (in Stopwatch Ticks) since the last frame |
438 | /// </summary> | 389 | /// </summary> |
439 | private long m_scriptExecutionTime = 0; | 390 | private long m_scriptExecutionTime = 0; |
@@ -449,11 +400,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
449 | /// </summary> | 400 | /// </summary> |
450 | private ManualResetEvent m_updateWaitEvent = new ManualResetEvent(false); | 401 | private ManualResetEvent m_updateWaitEvent = new ManualResetEvent(false); |
451 | 402 | ||
452 | /// <summary> | ||
453 | /// Used to control maintenance thread runs. | ||
454 | /// </summary> | ||
455 | private ManualResetEvent m_maintenanceWaitEvent = new ManualResetEvent(false); | ||
456 | |||
457 | // TODO: Possibly stop other classes being able to manipulate this directly. | 403 | // TODO: Possibly stop other classes being able to manipulate this directly. |
458 | private SceneGraph m_sceneGraph; | 404 | private SceneGraph m_sceneGraph; |
459 | private readonly Timer m_restartTimer = new Timer(15000); // Wait before firing | 405 | private readonly Timer m_restartTimer = new Timer(15000); // Wait before firing |
@@ -497,7 +443,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
497 | /// Is the scene active? | 443 | /// Is the scene active? |
498 | /// </summary> | 444 | /// </summary> |
499 | /// <remarks> | 445 | /// <remarks> |
500 | /// If false, maintenance and update loops are not being run, though after setting to false update may still | 446 | /// If false, update loop is not being run, though after setting to false update may still |
501 | /// be active for a period (and IsRunning will still be true). Updates can still be triggered manually if | 447 | /// be active for a period (and IsRunning will still be true). Updates can still be triggered manually if |
502 | /// the scene is not active. | 448 | /// the scene is not active. |
503 | /// </remarks> | 449 | /// </remarks> |
@@ -527,7 +473,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
527 | public bool IsRunning { get { return m_isRunning; } } | 473 | public bool IsRunning { get { return m_isRunning; } } |
528 | private volatile bool m_isRunning; | 474 | private volatile bool m_isRunning; |
529 | 475 | ||
530 | // private int m_lastUpdate; | ||
531 | private bool m_firstHeartbeat = true; | 476 | private bool m_firstHeartbeat = true; |
532 | 477 | ||
533 | // private UpdatePrioritizationSchemes m_priorityScheme = UpdatePrioritizationSchemes.Time; | 478 | // private UpdatePrioritizationSchemes m_priorityScheme = UpdatePrioritizationSchemes.Time; |
@@ -883,7 +828,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
883 | FrameTimeWarnPercent = 60; | 828 | FrameTimeWarnPercent = 60; |
884 | FrameTimeCritPercent = 40; | 829 | FrameTimeCritPercent = 40; |
885 | Normalized55FPS = true; | 830 | Normalized55FPS = true; |
886 | MinMaintenanceTime = 1; | ||
887 | SeeIntoRegion = true; | 831 | SeeIntoRegion = true; |
888 | 832 | ||
889 | Random random = new Random(); | 833 | Random random = new Random(); |
@@ -1147,17 +1091,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
1147 | 1091 | ||
1148 | } | 1092 | } |
1149 | 1093 | ||
1150 | |||
1151 | // FIXME: Ultimately this should be in a module. | ||
1152 | SendPeriodicAppearanceUpdates = false; | ||
1153 | |||
1154 | IConfig appearanceConfig = m_config.Configs["Appearance"]; | ||
1155 | if (appearanceConfig != null) | ||
1156 | { | ||
1157 | SendPeriodicAppearanceUpdates | ||
1158 | = appearanceConfig.GetBoolean("ResendAppearanceUpdates", SendPeriodicAppearanceUpdates); | ||
1159 | } | ||
1160 | |||
1161 | #endregion Region Config | 1094 | #endregion Region Config |
1162 | 1095 | ||
1163 | IConfig entityTransferConfig = m_config.Configs["EntityTransfer"]; | 1096 | IConfig entityTransferConfig = m_config.Configs["EntityTransfer"]; |
@@ -1197,16 +1130,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
1197 | ObjectsCullingByDistance | 1130 | ObjectsCullingByDistance |
1198 | = interestConfig.GetBoolean("ObjectsCullingByDistance", ObjectsCullingByDistance); | 1131 | = interestConfig.GetBoolean("ObjectsCullingByDistance", ObjectsCullingByDistance); |
1199 | 1132 | ||
1200 | |||
1201 | RootTerseUpdatePeriod = interestConfig.GetInt("RootTerseUpdatePeriod", RootTerseUpdatePeriod); | ||
1202 | ChildTerseUpdatePeriod = interestConfig.GetInt("ChildTerseUpdatePeriod", ChildTerseUpdatePeriod); | ||
1203 | |||
1204 | RootPositionUpdateTolerance | ||
1205 | = interestConfig.GetFloat("RootPositionUpdateTolerance", RootPositionUpdateTolerance); | ||
1206 | RootRotationUpdateTolerance | ||
1207 | = interestConfig.GetFloat("RootRotationUpdateTolerance", RootRotationUpdateTolerance); | ||
1208 | RootVelocityUpdateTolerance | ||
1209 | = interestConfig.GetFloat("RootVelocityUpdateTolerance", RootVelocityUpdateTolerance); | ||
1210 | } | 1133 | } |
1211 | 1134 | ||
1212 | m_log.DebugFormat("[SCENE]: Using the {0} prioritization scheme", UpdatePrioritizationScheme); | 1135 | m_log.DebugFormat("[SCENE]: Using the {0} prioritization scheme", UpdatePrioritizationScheme); |
@@ -1275,9 +1198,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
1275 | UpdatePrioritizationScheme = UpdatePrioritizationSchemes.Time; | 1198 | UpdatePrioritizationScheme = UpdatePrioritizationSchemes.Time; |
1276 | ReprioritizationInterval = 5000; | 1199 | ReprioritizationInterval = 5000; |
1277 | 1200 | ||
1278 | RootRotationUpdateTolerance = 0.1f; | ||
1279 | RootVelocityUpdateTolerance = 0.001f; | ||
1280 | RootPositionUpdateTolerance = 0.05f; | ||
1281 | ReprioritizationDistance = m_minReprioritizationDistance; | 1201 | ReprioritizationDistance = m_minReprioritizationDistance; |
1282 | 1202 | ||
1283 | m_eventManager = new EventManager(); | 1203 | m_eventManager = new EventManager(); |
@@ -1668,100 +1588,12 @@ namespace OpenSim.Region.Framework.Scenes | |||
1668 | // alarms for scenes with many objects. | 1588 | // alarms for scenes with many objects. |
1669 | Update(1); | 1589 | Update(1); |
1670 | 1590 | ||
1671 | WorkManager.StartThread( | ||
1672 | Maintenance, string.Format("Maintenance ({0})", RegionInfo.RegionName), ThreadPriority.Normal, false, true); | ||
1673 | |||
1674 | Watchdog.GetCurrentThreadInfo().AlarmIfTimeout = true; | 1591 | Watchdog.GetCurrentThreadInfo().AlarmIfTimeout = true; |
1675 | m_lastFrameTick = Util.EnvironmentTickCount(); | 1592 | m_lastFrameTick = Util.EnvironmentTickCount(); |
1676 | Update(-1); | 1593 | Update(-1); |
1677 | |||
1678 | Watchdog.RemoveThread(); | 1594 | Watchdog.RemoveThread(); |
1679 | } | 1595 | } |
1680 | 1596 | ||
1681 | private void Maintenance() | ||
1682 | { | ||
1683 | DoMaintenance(-1); | ||
1684 | |||
1685 | Watchdog.RemoveThread(); | ||
1686 | } | ||
1687 | |||
1688 | public void DoMaintenance(int runs) | ||
1689 | { | ||
1690 | long? endRun = null; | ||
1691 | int runtc, tmpMS; | ||
1692 | int previousMaintenanceTick; | ||
1693 | |||
1694 | if (runs >= 0) | ||
1695 | endRun = MaintenanceRun + runs; | ||
1696 | |||
1697 | List<Vector3> coarseLocations; | ||
1698 | List<UUID> avatarUUIDs; | ||
1699 | |||
1700 | while (!m_shuttingDown && ((endRun == null && Active) || MaintenanceRun < endRun)) | ||
1701 | { | ||
1702 | runtc = Util.EnvironmentTickCount(); | ||
1703 | ++MaintenanceRun; | ||
1704 | |||
1705 | // m_log.DebugFormat("[SCENE]: Maintenance run {0} in {1}", MaintenanceRun, Name); | ||
1706 | |||
1707 | // Coarse locations relate to positions of green dots on the mini-map (on a SecondLife client) | ||
1708 | if (MaintenanceRun % (m_update_coarse_locations / 10) == 0) | ||
1709 | { | ||
1710 | SceneGraph.GetCoarseLocations(out coarseLocations, out avatarUUIDs, 60); | ||
1711 | // Send coarse locations to clients | ||
1712 | ForEachScenePresence(delegate(ScenePresence presence) | ||
1713 | { | ||
1714 | presence.SendCoarseLocations(coarseLocations, avatarUUIDs); | ||
1715 | }); | ||
1716 | } | ||
1717 | |||
1718 | if (SendPeriodicAppearanceUpdates && MaintenanceRun % 60 == 0) | ||
1719 | { | ||
1720 | // m_log.DebugFormat("[SCENE]: Sending periodic appearance updates"); | ||
1721 | |||
1722 | if (AvatarFactory != null) | ||
1723 | { | ||
1724 | ForEachRootScenePresence(sp => AvatarFactory.SendAppearance(sp.UUID)); | ||
1725 | } | ||
1726 | } | ||
1727 | |||
1728 | // Delete temp-on-rez stuff | ||
1729 | if (MaintenanceRun % m_update_temp_cleaning == 0 && !m_cleaningTemps) | ||
1730 | { | ||
1731 | // m_log.DebugFormat("[SCENE]: Running temp-on-rez cleaning in {0}", Name); | ||
1732 | tmpMS = Util.EnvironmentTickCount(); | ||
1733 | m_cleaningTemps = true; | ||
1734 | |||
1735 | WorkManager.RunInThread( | ||
1736 | delegate { CleanTempObjects(); m_cleaningTemps = false; }, | ||
1737 | null, | ||
1738 | string.Format("CleanTempObjects ({0})", Name)); | ||
1739 | |||
1740 | tempOnRezMS = Util.EnvironmentTickCountSubtract(tmpMS); | ||
1741 | } | ||
1742 | |||
1743 | Watchdog.UpdateThread(); | ||
1744 | |||
1745 | previousMaintenanceTick = m_lastMaintenanceTick; | ||
1746 | m_lastMaintenanceTick = Util.EnvironmentTickCount(); | ||
1747 | runtc = Util.EnvironmentTickCountSubtract(m_lastMaintenanceTick, runtc); | ||
1748 | runtc = (int)(MinMaintenanceTime * 1000) - runtc; | ||
1749 | |||
1750 | if (runtc > 0) | ||
1751 | m_maintenanceWaitEvent.WaitOne(runtc); | ||
1752 | |||
1753 | // Optionally warn if a frame takes double the amount of time that it should. | ||
1754 | if (DebugUpdates | ||
1755 | && Util.EnvironmentTickCountSubtract( | ||
1756 | m_lastMaintenanceTick, previousMaintenanceTick) > (int)(MinMaintenanceTime * 1000 * 2)) | ||
1757 | m_log.WarnFormat( | ||
1758 | "[SCENE]: Maintenance took {0} ms (desired max {1} ms) in {2}", | ||
1759 | Util.EnvironmentTickCountSubtract(m_lastMaintenanceTick, previousMaintenanceTick), | ||
1760 | MinMaintenanceTime * 1000, | ||
1761 | RegionInfo.RegionName); | ||
1762 | } | ||
1763 | } | ||
1764 | |||
1765 | public override void Update(int frames) | 1597 | public override void Update(int frames) |
1766 | { | 1598 | { |
1767 | long? endFrame = null; | 1599 | long? endFrame = null; |
@@ -1822,6 +1654,18 @@ namespace OpenSim.Region.Framework.Scenes | |||
1822 | if (Frame % m_update_entitymovement == 0) | 1654 | if (Frame % m_update_entitymovement == 0) |
1823 | m_sceneGraph.UpdateScenePresenceMovement(); | 1655 | m_sceneGraph.UpdateScenePresenceMovement(); |
1824 | 1656 | ||
1657 | if (Frame % (m_update_coarse_locations) == 0) | ||
1658 | { | ||
1659 | List<Vector3> coarseLocations; | ||
1660 | List<UUID> avatarUUIDs; | ||
1661 | |||
1662 | SceneGraph.GetCoarseLocations(out coarseLocations, out avatarUUIDs, 60); | ||
1663 | // Send coarse locations to clients | ||
1664 | ForEachScenePresence(delegate(ScenePresence presence) | ||
1665 | { | ||
1666 | presence.SendCoarseLocations(coarseLocations, avatarUUIDs); | ||
1667 | }); | ||
1668 | } | ||
1825 | // Get the simulation frame time that the avatar force input | 1669 | // Get the simulation frame time that the avatar force input |
1826 | // took | 1670 | // took |
1827 | tmpMS2 = Util.GetTimeStampMS(); | 1671 | tmpMS2 = Util.GetTimeStampMS(); |
@@ -1864,7 +1708,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
1864 | if (Frame % m_update_temp_cleaning == 0 && !m_cleaningTemps) | 1708 | if (Frame % m_update_temp_cleaning == 0 && !m_cleaningTemps) |
1865 | { | 1709 | { |
1866 | m_cleaningTemps = true; | 1710 | m_cleaningTemps = true; |
1867 | Util.FireAndForget(delegate { CleanTempObjects(); m_cleaningTemps = false; }); | 1711 | WorkManager.RunInThread( |
1712 | delegate { CleanTempObjects(); m_cleaningTemps = false; }, null, string.Format("CleanTempObjects ({0})", Name)); | ||
1868 | tmpMS2 = Util.GetTimeStampMS(); | 1713 | tmpMS2 = Util.GetTimeStampMS(); |
1869 | tempOnRezMS = (float)(tmpMS2 - tmpMS); // bad.. counts the FireAndForget, not CleanTempObjects | 1714 | tempOnRezMS = (float)(tmpMS2 - tmpMS); // bad.. counts the FireAndForget, not CleanTempObjects |
1870 | tmpMS = tmpMS2; | 1715 | tmpMS = tmpMS2; |
@@ -2091,7 +1936,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2091 | if (!m_backingup) | 1936 | if (!m_backingup) |
2092 | { | 1937 | { |
2093 | m_backingup = true; | 1938 | m_backingup = true; |
2094 | WorkManager.RunInThread(o => Backup(false), null, string.Format("BackupWaitCallback ({0})", Name)); | 1939 | WorkManager.RunInThread(o => Backup(false), null, string.Format("BackupWorker ({0})", Name)); |
2095 | } | 1940 | } |
2096 | } | 1941 | } |
2097 | 1942 | ||
diff --git a/OpenSim/Region/OptionalModules/World/SceneCommands/SceneCommandsModule.cs b/OpenSim/Region/OptionalModules/World/SceneCommands/SceneCommandsModule.cs index d0d726c..7e3bd7f 100644 --- a/OpenSim/Region/OptionalModules/World/SceneCommands/SceneCommandsModule.cs +++ b/OpenSim/Region/OptionalModules/World/SceneCommands/SceneCommandsModule.cs | |||
@@ -96,18 +96,11 @@ namespace OpenSim.Region.OptionalModules.Avatar.Attachments | |||
96 | "List current scene options.", | 96 | "List current scene options.", |
97 | "active - if false then main scene update and maintenance loops are suspended.\n" | 97 | "active - if false then main scene update and maintenance loops are suspended.\n" |
98 | + "animations - if true then extra animations debug information is logged.\n" | 98 | + "animations - if true then extra animations debug information is logged.\n" |
99 | + "appear-refresh - if true then appearance is resent to other avatars every 60 seconds.\n" | ||
100 | + "client-pos-upd - the tolerance before clients are updated with new rotation information for an avatar.\n" | ||
101 | + "client-rot-upd - the tolerance before clients are updated with new rotation information for an avatar.\n" | ||
102 | + "client-vel-upd - the tolerance before clients are updated with new velocity information for an avatar.\n" | ||
103 | + "root-upd-per - if greater than 1, terse updates are only sent to root agents other than the originator on every n updates.\n" | ||
104 | + "child-upd-per - if greater than 1, terse updates are only sent to child agents on every n updates.\n" | ||
105 | + "collisions - if false then collisions with other objects are turned off.\n" | 99 | + "collisions - if false then collisions with other objects are turned off.\n" |
106 | + "pbackup - if false then periodic scene backup is turned off.\n" | 100 | + "pbackup - if false then periodic scene backup is turned off.\n" |
107 | + "physics - if false then all physics objects are non-physical.\n" | 101 | + "physics - if false then all physics objects are non-physical.\n" |
108 | + "scripting - if false then no scripting operations happen.\n" | 102 | + "scripting - if false then no scripting operations happen.\n" |
109 | + "teleport - if true then some extra teleport debug information is logged.\n" | 103 | + "teleport - if true then some extra teleport debug information is logged.\n" |
110 | + "update-on-timer - If true then the scene is updated via a timer. If false then a thread with sleep is used.\n" | ||
111 | + "updates - if true then any frame which exceeds double the maximum desired frame time is logged.", | 104 | + "updates - if true then any frame which exceeds double the maximum desired frame time is logged.", |
112 | HandleDebugSceneGetCommand); | 105 | HandleDebugSceneGetCommand); |
113 | 106 | ||
@@ -117,18 +110,11 @@ namespace OpenSim.Region.OptionalModules.Avatar.Attachments | |||
117 | "Turn on scene debugging options.", | 110 | "Turn on scene debugging options.", |
118 | "active - if false then main scene update and maintenance loops are suspended.\n" | 111 | "active - if false then main scene update and maintenance loops are suspended.\n" |
119 | + "animations - if true then extra animations debug information is logged.\n" | 112 | + "animations - if true then extra animations debug information is logged.\n" |
120 | + "appear-refresh - if true then appearance is resent to other avatars every 60 seconds.\n" | ||
121 | + "client-pos-upd - the tolerance before clients are updated with new rotation information for an avatar.\n" | ||
122 | + "client-rot-upd - the tolerance before clients are updated with new rotation information for an avatar.\n" | ||
123 | + "client-vel-upd - the tolerance before clients are updated with new velocity information for an avatar.\n" | ||
124 | + "root-upd-per - if greater than 1, terse updates are only sent to root agents other than the originator on every n updates.\n" | ||
125 | + "child-upd-per - if greater than 1, terse updates are only sent to child agents on every n updates.\n" | ||
126 | + "collisions - if false then collisions with other objects are turned off.\n" | 113 | + "collisions - if false then collisions with other objects are turned off.\n" |
127 | + "pbackup - if false then periodic scene backup is turned off.\n" | 114 | + "pbackup - if false then periodic scene backup is turned off.\n" |
128 | + "physics - if false then all physics objects are non-physical.\n" | 115 | + "physics - if false then all physics objects are non-physical.\n" |
129 | + "scripting - if false then no scripting operations happen.\n" | 116 | + "scripting - if false then no scripting operations happen.\n" |
130 | + "teleport - if true then some extra teleport debug information is logged.\n" | 117 | + "teleport - if true then some extra teleport debug information is logged.\n" |
131 | + "update-on-timer - If true then the scene is updated via a timer. If false then a thread with sleep is used.\n" | ||
132 | + "updates - if true then any frame which exceeds double the maximum desired frame time is logged.", | 118 | + "updates - if true then any frame which exceeds double the maximum desired frame time is logged.", |
133 | HandleDebugSceneSetCommand); | 119 | HandleDebugSceneSetCommand); |
134 | } | 120 | } |
@@ -153,17 +139,10 @@ namespace OpenSim.Region.OptionalModules.Avatar.Attachments | |||
153 | ConsoleDisplayList cdl = new ConsoleDisplayList(); | 139 | ConsoleDisplayList cdl = new ConsoleDisplayList(); |
154 | cdl.AddRow("active", m_scene.Active); | 140 | cdl.AddRow("active", m_scene.Active); |
155 | cdl.AddRow("animations", m_scene.DebugAnimations); | 141 | cdl.AddRow("animations", m_scene.DebugAnimations); |
156 | cdl.AddRow("appear-refresh", m_scene.SendPeriodicAppearanceUpdates); | ||
157 | cdl.AddRow("client-pos-upd", m_scene.RootPositionUpdateTolerance); | ||
158 | cdl.AddRow("client-rot-upd", m_scene.RootRotationUpdateTolerance); | ||
159 | cdl.AddRow("client-vel-upd", m_scene.RootVelocityUpdateTolerance); | ||
160 | cdl.AddRow("root-upd-per", m_scene.RootTerseUpdatePeriod); | ||
161 | cdl.AddRow("child-upd-per", m_scene.ChildTerseUpdatePeriod); | ||
162 | cdl.AddRow("pbackup", m_scene.PeriodicBackup); | 142 | cdl.AddRow("pbackup", m_scene.PeriodicBackup); |
163 | cdl.AddRow("physics", m_scene.PhysicsEnabled); | 143 | cdl.AddRow("physics", m_scene.PhysicsEnabled); |
164 | cdl.AddRow("scripting", m_scene.ScriptsEnabled); | 144 | cdl.AddRow("scripting", m_scene.ScriptsEnabled); |
165 | cdl.AddRow("teleport", m_scene.DebugTeleporting); | 145 | cdl.AddRow("teleport", m_scene.DebugTeleporting); |
166 | // cdl.AddRow("update-on-timer", m_scene.UpdateOnTimer); | ||
167 | cdl.AddRow("updates", m_scene.DebugUpdates); | 146 | cdl.AddRow("updates", m_scene.DebugUpdates); |
168 | 147 | ||
169 | MainConsole.Instance.OutputFormat("Scene {0} options:", m_scene.Name); | 148 | MainConsole.Instance.OutputFormat("Scene {0} options:", m_scene.Name); |
@@ -207,60 +186,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.Attachments | |||
207 | m_scene.DebugAnimations = active; | 186 | m_scene.DebugAnimations = active; |
208 | } | 187 | } |
209 | 188 | ||
210 | if (options.ContainsKey("appear-refresh")) | ||
211 | { | ||
212 | bool newValue; | ||
213 | |||
214 | // FIXME: This can only come from the console at the moment but might not always be true. | ||
215 | if (ConsoleUtil.TryParseConsoleBool(MainConsole.Instance, options["appear-refresh"], out newValue)) | ||
216 | m_scene.SendPeriodicAppearanceUpdates = newValue; | ||
217 | } | ||
218 | |||
219 | if (options.ContainsKey("client-pos-upd")) | ||
220 | { | ||
221 | float newValue; | ||
222 | |||
223 | // FIXME: This can only come from the console at the moment but might not always be true. | ||
224 | if (ConsoleUtil.TryParseConsoleFloat(MainConsole.Instance, options["client-pos-upd"], out newValue)) | ||
225 | m_scene.RootPositionUpdateTolerance = newValue; | ||
226 | } | ||
227 | |||
228 | if (options.ContainsKey("client-rot-upd")) | ||
229 | { | ||
230 | float newValue; | ||
231 | |||
232 | // FIXME: This can only come from the console at the moment but might not always be true. | ||
233 | if (ConsoleUtil.TryParseConsoleFloat(MainConsole.Instance, options["client-rot-upd"], out newValue)) | ||
234 | m_scene.RootRotationUpdateTolerance = newValue; | ||
235 | } | ||
236 | |||
237 | if (options.ContainsKey("client-vel-upd")) | ||
238 | { | ||
239 | float newValue; | ||
240 | |||
241 | // FIXME: This can only come from the console at the moment but might not always be true. | ||
242 | if (ConsoleUtil.TryParseConsoleFloat(MainConsole.Instance, options["client-vel-upd"], out newValue)) | ||
243 | m_scene.RootVelocityUpdateTolerance = newValue; | ||
244 | } | ||
245 | |||
246 | if (options.ContainsKey("root-upd-per")) | ||
247 | { | ||
248 | int newValue; | ||
249 | |||
250 | // FIXME: This can only come from the console at the moment but might not always be true. | ||
251 | if (ConsoleUtil.TryParseConsoleNaturalInt(MainConsole.Instance, options["root-upd-per"], out newValue)) | ||
252 | m_scene.RootTerseUpdatePeriod = newValue; | ||
253 | } | ||
254 | |||
255 | if (options.ContainsKey("child-upd-per")) | ||
256 | { | ||
257 | int newValue; | ||
258 | |||
259 | // FIXME: This can only come from the console at the moment but might not always be true. | ||
260 | if (ConsoleUtil.TryParseConsoleNaturalInt(MainConsole.Instance, options["child-upd-per"], out newValue)) | ||
261 | m_scene.ChildTerseUpdatePeriod = newValue; | ||
262 | } | ||
263 | |||
264 | if (options.ContainsKey("pbackup")) | 189 | if (options.ContainsKey("pbackup")) |
265 | { | 190 | { |
266 | bool active; | 191 | bool active; |
@@ -296,21 +221,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.Attachments | |||
296 | m_scene.DebugTeleporting = enableTeleportDebugging; | 221 | m_scene.DebugTeleporting = enableTeleportDebugging; |
297 | } | 222 | } |
298 | 223 | ||
299 | if (options.ContainsKey("update-on-timer")) | ||
300 | { | ||
301 | bool enableUpdateOnTimer; | ||
302 | if (bool.TryParse(options["update-on-timer"], out enableUpdateOnTimer)) | ||
303 | { | ||
304 | // m_scene.UpdateOnTimer = enableUpdateOnTimer; | ||
305 | m_scene.Active = false; | ||
306 | |||
307 | while (m_scene.IsRunning) | ||
308 | Thread.Sleep(20); | ||
309 | |||
310 | m_scene.Active = true; | ||
311 | } | ||
312 | } | ||
313 | |||
314 | if (options.ContainsKey("updates")) | 224 | if (options.ContainsKey("updates")) |
315 | { | 225 | { |
316 | bool enableUpdateDebugging; | 226 | bool enableUpdateDebugging; |