diff options
-rwxr-xr-x | OpenSim/Region/Framework/Scenes/Scene.cs | 43 |
1 files changed, 13 insertions, 30 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index b78ee6e..0905a56 100755 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -379,7 +379,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
379 | private int m_update_terrain = 1000; | 379 | private int m_update_terrain = 1000; |
380 | private int m_update_land = 10; | 380 | private int m_update_land = 10; |
381 | 381 | ||
382 | private int m_update_coarse_locations = 50; | 382 | private int m_update_coarse_locations = 5; |
383 | private int m_update_temp_cleaning = 180; | 383 | private int m_update_temp_cleaning = 180; |
384 | 384 | ||
385 | private float agentMS; | 385 | private float agentMS; |
@@ -1640,8 +1640,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
1640 | if (runs >= 0) | 1640 | if (runs >= 0) |
1641 | endRun = MaintenanceRun + runs; | 1641 | endRun = MaintenanceRun + runs; |
1642 | 1642 | ||
1643 | List<Vector3> coarseLocations; | ||
1644 | List<UUID> avatarUUIDs; | ||
1645 | 1643 | ||
1646 | while (!m_shuttingDown && ((endRun == null && Active) || MaintenanceRun < endRun)) | 1644 | while (!m_shuttingDown && ((endRun == null && Active) || MaintenanceRun < endRun)) |
1647 | { | 1645 | { |
@@ -1650,33 +1648,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
1650 | 1648 | ||
1651 | // m_log.DebugFormat("[SCENE]: Maintenance run {0} in {1}", MaintenanceRun, Name); | 1649 | // m_log.DebugFormat("[SCENE]: Maintenance run {0} in {1}", MaintenanceRun, Name); |
1652 | 1650 | ||
1653 | // Coarse locations relate to positions of green dots on the mini-map (on a SecondLife client) | ||
1654 | if (MaintenanceRun % (m_update_coarse_locations / 10) == 0) | ||
1655 | { | ||
1656 | SceneGraph.GetCoarseLocations(out coarseLocations, out avatarUUIDs, 60); | ||
1657 | // Send coarse locations to clients | ||
1658 | ForEachScenePresence(delegate(ScenePresence presence) | ||
1659 | { | ||
1660 | presence.SendCoarseLocations(coarseLocations, avatarUUIDs); | ||
1661 | }); | ||
1662 | } | ||
1663 | |||
1664 | /* this is done on heartbeat | ||
1665 | // Delete temp-on-rez stuff | ||
1666 | if (MaintenanceRun % m_update_temp_cleaning == 0 && !m_cleaningTemps) | ||
1667 | { | ||
1668 | // m_log.DebugFormat("[SCENE]: Running temp-on-rez cleaning in {0}", Name); | ||
1669 | tmpMS = Util.EnvironmentTickCount(); | ||
1670 | m_cleaningTemps = true; | ||
1671 | |||
1672 | WorkManager.RunInThread( | ||
1673 | delegate { CleanTempObjects(); m_cleaningTemps = false; }, | ||
1674 | null, | ||
1675 | string.Format("CleanTempObjects ({0})", Name)); | ||
1676 | |||
1677 | tempOnRezMS = Util.EnvironmentTickCountSubtract(tmpMS); | ||
1678 | } | ||
1679 | */ | ||
1680 | Watchdog.UpdateThread(); | 1651 | Watchdog.UpdateThread(); |
1681 | 1652 | ||
1682 | previousMaintenanceTick = m_lastMaintenanceTick; | 1653 | previousMaintenanceTick = m_lastMaintenanceTick; |
@@ -1759,6 +1730,18 @@ namespace OpenSim.Region.Framework.Scenes | |||
1759 | if (Frame % m_update_entitymovement == 0) | 1730 | if (Frame % m_update_entitymovement == 0) |
1760 | m_sceneGraph.UpdateScenePresenceMovement(); | 1731 | m_sceneGraph.UpdateScenePresenceMovement(); |
1761 | 1732 | ||
1733 | if (Frame % (m_update_coarse_locations) == 0) | ||
1734 | { | ||
1735 | List<Vector3> coarseLocations; | ||
1736 | List<UUID> avatarUUIDs; | ||
1737 | |||
1738 | SceneGraph.GetCoarseLocations(out coarseLocations, out avatarUUIDs, 60); | ||
1739 | // Send coarse locations to clients | ||
1740 | ForEachScenePresence(delegate(ScenePresence presence) | ||
1741 | { | ||
1742 | presence.SendCoarseLocations(coarseLocations, avatarUUIDs); | ||
1743 | }); | ||
1744 | } | ||
1762 | // Get the simulation frame time that the avatar force input | 1745 | // Get the simulation frame time that the avatar force input |
1763 | // took | 1746 | // took |
1764 | tmpMS2 = Util.GetTimeStampMS(); | 1747 | tmpMS2 = Util.GetTimeStampMS(); |