From bc892c1d4c1f1e818f1dd1d3cf6d03186b19dd0b Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Tue, 29 Sep 2009 07:54:56 -0700 Subject: A little hack to see if this fixes the problems with ~20% of SOG's becoming phantom after an import to megaregions. --- OpenSim/Region/Framework/Scenes/SceneGraph.cs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'OpenSim/Region/Framework/Scenes/SceneGraph.cs') diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs index 48dea07..0c471aa 100644 --- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs +++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs @@ -1134,6 +1134,23 @@ namespace OpenSim.Region.Framework.Scenes } } + protected internal void ForEachSOG(Action action) + { + List objlist = new List(SceneObjectGroupsByFullID.Values); + foreach (SceneObjectGroup obj in objlist) + { + try + { + action(obj); + } + catch (Exception e) + { + // Catch it and move on. This includes situations where splist has inconsistent info + m_log.WarnFormat("[SCENE]: Problem processing action in ForEachSOG: ", e.Message); + } + } + } + #endregion #region Client Event handlers -- cgit v1.1 From ee205e7e812e170f670e690a4e0fa9caa652f226 Mon Sep 17 00:00:00 2001 From: Jeff Ames Date: Thu, 1 Oct 2009 01:00:09 +0900 Subject: Formatting cleanup. --- OpenSim/Region/Framework/Scenes/SceneGraph.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Region/Framework/Scenes/SceneGraph.cs') diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs index 0c471aa..54ac792 100644 --- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs +++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs @@ -845,7 +845,7 @@ namespace OpenSim.Region.Framework.Scenes ScenePresence sp; lock (ScenePresences) - { + { ScenePresences.TryGetValue(agentID, out sp); } -- cgit v1.1