mirror of
https://github.com/opensim/opensim.git
synced 2026-08-08 18:25:33 +08:00
* Refactor: Remove SceneObjectGroup.GetScenePresences() in favour of a direct call to Scene
This commit is contained in:
@@ -35,13 +35,15 @@ 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;
|
||||
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user