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.
avinationmerge
Melanie Thielker 2010-08-26 01:06:50 +02:00
parent 4b47008d30
commit 47818a2db3
1 changed files with 4 additions and 2 deletions

View File

@ -1140,9 +1140,11 @@ namespace OpenSim.Region.Framework.Scenes
/// <param name="action"></param>
protected internal void ForEachSOG(Action<SceneObjectGroup> action)
{
List<SceneObjectGroup> objlist = new List<SceneObjectGroup>(SceneObjectGroupsByFullID.Values);
foreach (SceneObjectGroup obj in objlist)
List<EntityBase> objlist = Entities.GetAllByType<SceneObjectGroup>();
foreach (EntityBase ent in objlist)
{
SceneObjectGroup obj = (SceneObjectGroup)ent;
try
{
action(obj);