aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs16
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs4
2 files changed, 17 insertions, 3 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 2a3f068..8d81812 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -64,6 +64,8 @@ namespace OpenSim.Region.Framework.Scenes
64 64
65 protected Timer m_restartWaitTimer = new Timer(); 65 protected Timer m_restartWaitTimer = new Timer();
66 66
67 protected Thread m_updateEntitiesThread;
68
67 public SimStatsReporter StatsReporter; 69 public SimStatsReporter StatsReporter;
68 70
69 protected List<RegionInfo> m_regionRestartNotifyList = new List<RegionInfo>(); 71 protected List<RegionInfo> m_regionRestartNotifyList = new List<RegionInfo>();
@@ -852,7 +854,19 @@ namespace OpenSim.Region.Framework.Scenes
852 otherMS = Environment.TickCount; 854 otherMS = Environment.TickCount;
853 // run through all entities looking for updates (slow) 855 // run through all entities looking for updates (slow)
854 if (m_frame % m_update_entities == 0) 856 if (m_frame % m_update_entities == 0)
855 m_sceneGraph.UpdateEntities(); 857 {
858 if (m_updateEntitiesThread == null)
859 {
860 m_updateEntitiesThread = new Thread(m_sceneGraph.UpdateEntities);
861 ThreadTracker.Add(m_updateEntitiesThread);
862 }
863
864 if(!m_updateEntitiesThread.IsAlive)
865 m_updateEntitiesThread.Start();
866
867 //m_sceneGraph.UpdateEntities();
868 }
869
856 870
857 // run through entities that have scheduled themselves for 871 // run through entities that have scheduled themselves for
858 // updates looking for updates(faster) 872 // updates looking for updates(faster)
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
index d1aef1c..2ca0342 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
@@ -1733,12 +1733,12 @@ namespace OpenSim.Region.Framework.Scenes
1733 //return; 1733 //return;
1734 //} 1734 //}
1735 1735
1736 if ((Util.GetDistanceTo(lastPhysGroupPos, AbsolutePosition) > 0.02) && UsePhysics) 1736 if (Util.DistanceLessThan(lastPhysGroupPos, AbsolutePosition, 0.02) && UsePhysics)
1737 { 1737 {
1738 m_rootPart.UpdateFlag = 1; 1738 m_rootPart.UpdateFlag = 1;
1739 lastPhysGroupPos = AbsolutePosition; 1739 lastPhysGroupPos = AbsolutePosition;
1740 } 1740 }
1741 //foreach (SceneObjectPart part in m_parts.Values) 1741 //foreach (SceneObjectPart part in m_parts.Values)
1742 //{ 1742 //{
1743 //if (part.UpdateFlag == 0) part.UpdateFlag = 1; 1743 //if (part.UpdateFlag == 0) part.UpdateFlag = 1;
1744 //} 1744 //}