aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/Scene.cs
diff options
context:
space:
mode:
authorUbitUmarov2015-08-27 15:01:15 +0100
committerUbitUmarov2015-08-27 15:01:15 +0100
commitb82b16c954a0f3921efbdcfe7d7eb378f71e96be (patch)
tree6bc64951ebdc7c6ec691c2e588d8c21ffda4bd21 /OpenSim/Region/Framework/Scenes/Scene.cs
parentminor clear. Use isTainted in is read clear form (diff)
downloadopensim-SC_OLD-b82b16c954a0f3921efbdcfe7d7eb378f71e96be.zip
opensim-SC_OLD-b82b16c954a0f3921efbdcfe7d7eb378f71e96be.tar.gz
opensim-SC_OLD-b82b16c954a0f3921efbdcfe7d7eb378f71e96be.tar.bz2
opensim-SC_OLD-b82b16c954a0f3921efbdcfe7d7eb378f71e96be.tar.xz
take taints check terrain out of Onframe event and add a new event for it. Slow it down to 1/4 heartbeat rate (once every 363ms aprox)
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs29
1 files changed, 23 insertions, 6 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index d6a1fab..41f8871 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -245,8 +245,8 @@ namespace OpenSim.Region.Framework.Scenes
245 get { return m_defaultDrawDistance; } 245 get { return m_defaultDrawDistance; }
246 } 246 }
247 247
248// protected float m_maxDrawDistance = 512.0f; 248 protected float m_maxDrawDistance = 512.0f;
249 protected float m_maxDrawDistance = 256.0f; 249// protected float m_maxDrawDistance = 256.0f;
250 public float MaxDrawDistance 250 public float MaxDrawDistance
251 { 251 {
252 get { return m_maxDrawDistance; } 252 get { return m_maxDrawDistance; }
@@ -1581,13 +1581,20 @@ namespace OpenSim.Region.Framework.Scenes
1581 EventManager.TriggerRegionHeartbeatStart(this); 1581 EventManager.TriggerRegionHeartbeatStart(this);
1582 1582
1583 // Apply taints in terrain module to terrain in physics scene 1583 // Apply taints in terrain module to terrain in physics scene
1584
1585 tmpMS = Util.EnvironmentTickCount();
1586 if (Frame % 4 == 0)
1587 {
1588 CheckTerrainUpdates();
1589 }
1590
1584 if (Frame % m_update_terrain == 0) 1591 if (Frame % m_update_terrain == 0)
1585 { 1592 {
1586 tmpMS = Util.EnvironmentTickCount();
1587 UpdateTerrain(); 1593 UpdateTerrain();
1588 terrainMS = Util.EnvironmentTickCountSubtract(tmpMS);
1589 } 1594 }
1590 1595
1596 terrainMS = Util.EnvironmentTickCountSubtract(tmpMS);
1597
1591 tmpMS = Util.EnvironmentTickCount(); 1598 tmpMS = Util.EnvironmentTickCount();
1592 if (PhysicsEnabled && Frame % m_update_physics == 0) 1599 if (PhysicsEnabled && Frame % m_update_physics == 0)
1593 m_sceneGraph.UpdatePreparePhysics(); 1600 m_sceneGraph.UpdatePreparePhysics();
@@ -1809,6 +1816,11 @@ namespace OpenSim.Region.Framework.Scenes
1809 EventManager.TriggerTerrainTick(); 1816 EventManager.TriggerTerrainTick();
1810 } 1817 }
1811 1818
1819 private void CheckTerrainUpdates()
1820 {
1821 EventManager.TriggerTerrainCheckUpdates();
1822 }
1823
1812 /// <summary> 1824 /// <summary>
1813 /// Back up queued up changes 1825 /// Back up queued up changes
1814 /// </summary> 1826 /// </summary>
@@ -5880,11 +5892,12 @@ Environment.Exit(1);
5880 /// or corssing the broder walking, but will NOT prevent 5892 /// or corssing the broder walking, but will NOT prevent
5881 /// child agent creation, thereby emulating the SL behavior. 5893 /// child agent creation, thereby emulating the SL behavior.
5882 /// </remarks> 5894 /// </remarks>
5883 /// <param name='agentID'></param> 5895 /// <param name='agentID'>The visitor's User ID</param>
5896 /// <param name="agentHomeURI">The visitor's Home URI (may be null)</param>
5884 /// <param name='position'></param> 5897 /// <param name='position'></param>
5885 /// <param name='reason'></param> 5898 /// <param name='reason'></param>
5886 /// <returns></returns> 5899 /// <returns></returns>
5887 public bool QueryAccess(UUID agentID, Vector3 position, out string reason) 5900 public bool QueryAccess(UUID agentID, string agentHomeURI, bool viaTeleport, Vector3 position, out string reason)
5888 { 5901 {
5889 reason = "You are banned from the region"; 5902 reason = "You are banned from the region";
5890 5903
@@ -5894,6 +5907,10 @@ Environment.Exit(1);
5894 return true; 5907 return true;
5895 } 5908 }
5896 5909
5910
5911// if (!AllowAvatarCrossing && !viaTeleport)
5912// return false;
5913
5897 // FIXME: Root agent count is currently known to be inaccurate. This forces a recount before we check. 5914 // FIXME: Root agent count is currently known to be inaccurate. This forces a recount before we check.
5898 // However, the long term fix is to make sure root agent count is always accurate. 5915 // However, the long term fix is to make sure root agent count is always accurate.
5899 m_sceneGraph.RecalculateStats(); 5916 m_sceneGraph.RecalculateStats();