diff options
author | Melanie Thielker | 2010-08-26 01:06:50 +0200 |
---|---|---|
committer | Melanie Thielker | 2010-08-26 01:06:50 +0200 |
commit | 47818a2db303eefaf59f7c98d03112bfb1371379 (patch) | |
tree | 772f39a99aa850b3b72493f444bae92f3762fc58 /OpenSim/Region/Framework/Scenes/SceneGraph.cs | |
parent | Correct whitespace (diff) | |
download | opensim-SC-47818a2db303eefaf59f7c98d03112bfb1371379.zip opensim-SC-47818a2db303eefaf59f7c98d03112bfb1371379.tar.gz opensim-SC-47818a2db303eefaf59f7c98d03112bfb1371379.tar.bz2 opensim-SC-47818a2db303eefaf59f7c98d03112bfb1371379.tar.xz |
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.
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneGraph.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneGraph.cs | 6 |
1 files changed, 4 insertions, 2 deletions
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 | |||
1140 | /// <param name="action"></param> | 1140 | /// <param name="action"></param> |
1141 | protected internal void ForEachSOG(Action<SceneObjectGroup> action) | 1141 | protected internal void ForEachSOG(Action<SceneObjectGroup> action) |
1142 | { | 1142 | { |
1143 | List<SceneObjectGroup> objlist = new List<SceneObjectGroup>(SceneObjectGroupsByFullID.Values); | 1143 | List<EntityBase> objlist = Entities.GetAllByType<SceneObjectGroup>(); |
1144 | foreach (SceneObjectGroup obj in objlist) | 1144 | foreach (EntityBase ent in objlist) |
1145 | { | 1145 | { |
1146 | SceneObjectGroup obj = (SceneObjectGroup)ent; | ||
1147 | |||
1146 | try | 1148 | try |
1147 | { | 1149 | { |
1148 | action(obj); | 1150 | action(obj); |