From 47818a2db303eefaf59f7c98d03112bfb1371379 Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Thu, 26 Aug 2010 01:06:50 +0200 Subject: Fix a horrible bug in SG, where iteration of scene objects is carried out in a fashion that causes the delegate to be invoked once per child prim for a given group. --- OpenSim/Region/Framework/Scenes/SceneGraph.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs index 9c5ee60..1d952c4 100644 --- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs +++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs @@ -1140,9 +1140,11 @@ namespace OpenSim.Region.Framework.Scenes /// protected internal void ForEachSOG(Action action) { - List objlist = new List(SceneObjectGroupsByFullID.Values); - foreach (SceneObjectGroup obj in objlist) + List objlist = Entities.GetAllByType(); + foreach (EntityBase ent in objlist) { + SceneObjectGroup obj = (SceneObjectGroup)ent; + try { action(obj); -- cgit v1.1