mirror of
https://github.com/opensim/opensim.git
synced 2026-08-07 17:55:48 +08:00
Minor ScenePresence related refactoring
This commit is contained in:
@@ -316,21 +316,17 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
List<ScenePresence> avatars = new List<ScenePresence>();
|
||||
|
||||
ForEachCurrentScene(delegate(Scene scene)
|
||||
{
|
||||
List<EntityBase> EntitieList = scene.GetEntities();
|
||||
{
|
||||
List<ScenePresence> scenePrescences = scene.GetScenePresences();
|
||||
|
||||
foreach (EntityBase entity in EntitieList)
|
||||
{
|
||||
if (entity is ScenePresence)
|
||||
{
|
||||
ScenePresence scenePrescence = entity as ScenePresence;
|
||||
if (!scenePrescence.IsChildAgent)
|
||||
{
|
||||
avatars.Add(scenePrescence);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
foreach (ScenePresence scenePrescence in scenePrescences)
|
||||
{
|
||||
if (!scenePrescence.IsChildAgent)
|
||||
{
|
||||
avatars.Add(scenePrescence);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
return avatars;
|
||||
}
|
||||
@@ -423,4 +419,4 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
m_localScenes.ForEach(action);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user