mirror of
https://github.com/opensim/opensim.git
synced 2026-08-06 01:06:30 +08:00
Rename ForEachAvatar back to ForEachScenePresence. The other changes
from previous commit which sort out which iterator is used are left intact. A discussion is needed as to what constitutes an avatar vs a ScenePresence.
This commit is contained in:
@@ -872,7 +872,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
|
||||
try
|
||||
{
|
||||
ForEachAvatar(delegate(ScenePresence agent)
|
||||
ForEachRootScenePresence(delegate(ScenePresence agent)
|
||||
{
|
||||
//agent.ControllingClient.new
|
||||
//this.CommsManager.InterRegion.InformRegionOfChildAgent(otherRegion.RegionHandle, agent.ControllingClient.RequestClientInfo());
|
||||
@@ -1017,7 +1017,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
GridRegion r = new GridRegion(region);
|
||||
try
|
||||
{
|
||||
ForEachAvatar(delegate(ScenePresence agent)
|
||||
ForEachRootScenePresence(delegate(ScenePresence agent)
|
||||
{
|
||||
if (m_teleportModule != null)
|
||||
m_teleportModule.EnableChildAgent(agent, r);
|
||||
@@ -4228,7 +4228,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
/// Avatars may be an NPC or a 'real' client.
|
||||
/// </summary>
|
||||
/// <param name="action"></param>
|
||||
public void ForEachAvatar(Action<ScenePresence> action)
|
||||
public void ForEachRootScenePresence(Action<ScenePresence> action)
|
||||
{
|
||||
if(m_sceneGraph != null)
|
||||
{
|
||||
@@ -4326,7 +4326,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
/// <param name="action"></param>
|
||||
public void ForEachRootClient(Action<IClientAPI> action)
|
||||
{
|
||||
ForEachAvatar(delegate(ScenePresence presence)
|
||||
ForEachRootScenePresence(delegate(ScenePresence presence)
|
||||
{
|
||||
action(presence.ControllingClient);
|
||||
});
|
||||
|
||||
@@ -481,7 +481,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
ForEachCurrentScene(
|
||||
delegate(Scene scene)
|
||||
{
|
||||
scene.ForEachAvatar(delegate(ScenePresence scenePresence)
|
||||
scene.ForEachRootScenePresence(delegate(ScenePresence scenePresence)
|
||||
{
|
||||
avatars.Add(scenePresence);
|
||||
});
|
||||
|
||||
@@ -1150,7 +1150,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
{
|
||||
SceneObjectPart part = parts[i];
|
||||
|
||||
Scene.ForEachAvatar(delegate(ScenePresence avatar)
|
||||
Scene.ForEachRootScenePresence(delegate(ScenePresence avatar)
|
||||
{
|
||||
if (avatar.ParentID == LocalId)
|
||||
avatar.StandUp();
|
||||
|
||||
@@ -2216,7 +2216,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
}
|
||||
else
|
||||
{
|
||||
m_parentGroup.Scene.ForEachAvatar(delegate(ScenePresence av)
|
||||
m_parentGroup.Scene.ForEachRootScenePresence(delegate(ScenePresence av)
|
||||
{
|
||||
if (av.LocalId == localId)
|
||||
{
|
||||
@@ -2347,7 +2347,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
}
|
||||
else
|
||||
{
|
||||
m_parentGroup.Scene.ForEachAvatar(delegate(ScenePresence av)
|
||||
m_parentGroup.Scene.ForEachRootScenePresence(delegate(ScenePresence av)
|
||||
{
|
||||
if (av.LocalId == localId)
|
||||
{
|
||||
@@ -2470,7 +2470,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
}
|
||||
else
|
||||
{
|
||||
m_parentGroup.Scene.ForEachAvatar(delegate(ScenePresence av)
|
||||
m_parentGroup.Scene.ForEachRootScenePresence(delegate(ScenePresence av)
|
||||
{
|
||||
if (av.LocalId == localId)
|
||||
{
|
||||
@@ -2696,7 +2696,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
}
|
||||
}
|
||||
|
||||
m_parentGroup.Scene.ForEachAvatar(delegate(ScenePresence sp)
|
||||
m_parentGroup.Scene.ForEachRootScenePresence(delegate(ScenePresence sp)
|
||||
{
|
||||
if (!(Util.GetDistanceTo(sp.AbsolutePosition, AbsolutePosition) >= 100))
|
||||
sp.ControllingClient.SendPreLoadSound(objectID, objectID, soundID);
|
||||
|
||||
@@ -956,7 +956,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
}
|
||||
|
||||
// send the animations of the other presences to me
|
||||
m_scene.ForEachAvatar(delegate(ScenePresence presence)
|
||||
m_scene.ForEachRootScenePresence(delegate(ScenePresence presence)
|
||||
{
|
||||
if (presence != this)
|
||||
presence.Animator.SendAnimPackToClient(ControllingClient);
|
||||
@@ -2596,7 +2596,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
public void SendOtherAgentsAvatarDataToMe()
|
||||
{
|
||||
int count = 0;
|
||||
m_scene.ForEachAvatar(delegate(ScenePresence scenePresence)
|
||||
m_scene.ForEachRootScenePresence(delegate(ScenePresence scenePresence)
|
||||
{
|
||||
// only send information about other root agents
|
||||
if (scenePresence.UUID == UUID)
|
||||
@@ -2660,7 +2660,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
// m_log.DebugFormat("[SCENE PRESENCE] SendOtherAgentsAppearanceToMe: {0} {1}", Name, UUID);
|
||||
|
||||
int count = 0;
|
||||
m_scene.ForEachAvatar(delegate(ScenePresence scenePresence)
|
||||
m_scene.ForEachRootScenePresence(delegate(ScenePresence scenePresence)
|
||||
{
|
||||
// only send information about other root agents
|
||||
if (scenePresence.UUID == UUID)
|
||||
|
||||
Reference in New Issue
Block a user