Get rid of IScene.PresenceChildStatus() which always had to execute a lookup in favour of IClientAPI.ISceneAgent.IsChildAgent instead.

This commit is contained in:
Justin Clark-Casey (justincc)
2011-12-09 23:07:53 +00:00
parent fc27806e90
commit af3cd00048
7 changed files with 16 additions and 57 deletions

View File

@@ -4192,17 +4192,6 @@ namespace OpenSim.Region.Framework.Scenes
return m_sceneGraph.GetScenePresence(localID);
}
/// <summary>
/// Returns true if scene presence is a child (no avatar in this scene)
/// </summary>
/// <param name="avatarID"></param>
/// <returns></returns>
public override bool PresenceChildStatus(UUID avatarID)
{
ScenePresence sp;
return TryGetScenePresence(avatarID, out sp) && sp.IsChildAgent;
}
/// <summary>
/// Performs action on all avatars in the scene (root scene presences)
/// Avatars may be an NPC or a 'real' client.

View File

@@ -211,11 +211,6 @@ namespace OpenSim.Region.Framework.Scenes
}
#region admin stuff
public virtual bool PresenceChildStatus(UUID avatarID)
{
return false;
}
public abstract void OtherRegionUp(GridRegion otherRegion);

View File

@@ -612,19 +612,7 @@ namespace OpenSim.Region.Framework.Scenes
}
}
/// <summary>
/// If this is true, agent doesn't have a representation in this scene.
/// this is an agent 'looking into' this scene from a nearby scene(region)
///
/// if False, this agent has a representation in this scene
/// </summary>
private bool m_isChildAgent = true;
public bool IsChildAgent
{
get { return m_isChildAgent; }
set { m_isChildAgent = value; }
}
public bool IsChildAgent { get; set; }
public uint ParentID
{
@@ -741,6 +729,7 @@ namespace OpenSim.Region.Framework.Scenes
{
AttachmentsSyncLock = new Object();
IsChildAgent = true;
m_sendCourseLocationsMethod = SendCoarseLocationsDefault;
Animator = new ScenePresenceAnimator(this);
PresenceType = type;