* Refactor: Remove SceneObjectGroup.GetScenePresences() in favour of a direct call to Scene

0.6.0-stable
Justin Clarke Casey 2008-05-14 21:09:41 +00:00
parent c565391a70
commit 587f6ab645
4 changed files with 13 additions and 20 deletions

View File

@ -36,12 +36,14 @@ namespace OpenSim.Region.Environment.Scenes
[Serializable]
public abstract class EntityBase : ISerializable
{
protected Scene m_scene;
/// <summary>
/// The scene to which this entity belongs
/// </summary>
public Scene Scene
{
get { return m_scene; }
}
protected Scene m_scene;
protected LLUUID m_uuid;

View File

@ -3096,7 +3096,7 @@ namespace OpenSim.Region.Environment.Scenes
}
/// <summary>
/// Request a List of all ScenePresences in this region
/// Request a List of all ScenePresences in this region. This returns child agents as well as root agents.
/// </summary>
/// <returns></returns>
public List<ScenePresence> GetScenePresences()

View File

@ -785,15 +785,6 @@ namespace OpenSim.Region.Environment.Scenes
part.ClearUndoState();
}
/// <summary>
///
/// </summary>
/// <returns></returns>
public List<ScenePresence> GetScenePresences()
{
return m_scene.GetScenePresences();
}
public override void UpdateMovement()
{
lock (m_parts)
@ -933,7 +924,7 @@ namespace OpenSim.Region.Environment.Scenes
{
foreach (SceneObjectPart part in m_parts.Values)
{
List<ScenePresence> avatars = GetScenePresences();
List<ScenePresence> avatars = Scene.GetScenePresences();
for (int i = 0; i < avatars.Count; i++)
{
if (avatars[i].ParentID == LocalId)

View File

@ -2247,7 +2247,7 @@ namespace OpenSim.Region.Environment.Scenes
private void SendObjectPropertiesToClient(LLUUID AgentID)
{
List<ScenePresence> avatars = m_parentGroup.GetScenePresences();
List<ScenePresence> avatars = m_parentGroup.Scene.GetScenePresences();
for (int i = 0; i < avatars.Count; i++)
{
// Ugly reference :(
@ -2277,7 +2277,7 @@ namespace OpenSim.Region.Environment.Scenes
/// </summary>
public void AddFullUpdateToAllAvatars()
{
List<ScenePresence> avatars = m_parentGroup.GetScenePresences();
List<ScenePresence> avatars = m_parentGroup.Scene.GetScenePresences();
for (int i = 0; i < avatars.Count; i++)
{
avatars[i].QueuePartForUpdate(this);
@ -2286,7 +2286,7 @@ namespace OpenSim.Region.Environment.Scenes
public void SendFullUpdateToAllClientsExcept(LLUUID agentID)
{
List<ScenePresence> avatars = m_parentGroup.GetScenePresences();
List<ScenePresence> avatars = m_parentGroup.Scene.GetScenePresences();
for (int i = 0; i < avatars.Count; i++)
{
// Ugly reference :(
@ -2309,7 +2309,7 @@ namespace OpenSim.Region.Environment.Scenes
/// </summary>
public void SendFullUpdateToAllClients()
{
List<ScenePresence> avatars = m_parentGroup.GetScenePresences();
List<ScenePresence> avatars = m_parentGroup.Scene.GetScenePresences();
for (int i = 0; i < avatars.Count; i++)
{
// Ugly reference :(
@ -2370,7 +2370,7 @@ namespace OpenSim.Region.Environment.Scenes
/// Terse updates
public void AddTerseUpdateToAllAvatars()
{
List<ScenePresence> avatars = m_parentGroup.GetScenePresences();
List<ScenePresence> avatars = m_parentGroup.Scene.GetScenePresences();
for (int i = 0; i < avatars.Count; i++)
{
avatars[i].QueuePartForUpdate(this);
@ -2387,7 +2387,7 @@ namespace OpenSim.Region.Environment.Scenes
/// </summary>
public void SendTerseUpdateToAllClients()
{
List<ScenePresence> avatars = m_parentGroup.GetScenePresences();
List<ScenePresence> avatars = m_parentGroup.Scene.GetScenePresences();
for (int i = 0; i < avatars.Count; i++)
{
m_parentGroup.SendPartTerseUpdate(avatars[i].ControllingClient, this);