From b8d50b10fbb03ed8c8a9aac94564c354559c3bb0 Mon Sep 17 00:00:00 2001
From: Dan Lake
Date: Thu, 3 Nov 2011 17:53:51 -0700
Subject: 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.
---
OpenSim/ApplicationPlugins/Rest/Inventory/tests/Remote.cs | 2 +-
OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs | 2 +-
OpenSim/Region/CoreModules/World/Land/LandObject.cs | 2 +-
OpenSim/Region/CoreModules/World/Sound/SoundModule.cs | 4 ++--
OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs | 4 ++--
OpenSim/Region/Framework/Scenes/Scene.cs | 8 ++++----
OpenSim/Region/Framework/Scenes/SceneManager.cs | 2 +-
OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 2 +-
OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 8 ++++----
OpenSim/Region/Framework/Scenes/ScenePresence.cs | 6 +++---
.../Avatar/Appearance/AppearanceInfoModule.cs | 4 ++--
.../OptionalModules/Avatar/Concierge/ConciergeModule.cs | 2 +-
OpenSim/Region/RegionCombinerModule/RegionCombinerModule.cs | 2 +-
.../Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 12 ++++++------
.../ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | 6 +++---
.../Shared/Api/Implementation/Plugins/SensorRepeat.cs | 4 ++--
16 files changed, 35 insertions(+), 35 deletions(-)
(limited to 'OpenSim')
diff --git a/OpenSim/ApplicationPlugins/Rest/Inventory/tests/Remote.cs b/OpenSim/ApplicationPlugins/Rest/Inventory/tests/Remote.cs
index 8700786..1c1afd0 100644
--- a/OpenSim/ApplicationPlugins/Rest/Inventory/tests/Remote.cs
+++ b/OpenSim/ApplicationPlugins/Rest/Inventory/tests/Remote.cs
@@ -148,7 +148,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory.Tests
Rest.main.SceneManager.ForEachScene(delegate(Scene s)
{
- s.ForEachAvatar(delegate(ScenePresence sp)
+ s.ForEachRootScenePresence(delegate(ScenePresence sp)
{
if (sp.Firstname == names[0] && sp.Lastname == names[1])
{
diff --git a/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs b/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs
index 783a03b..10b4c37 100644
--- a/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs
@@ -230,7 +230,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat
{
// This should use ForEachClient, but clients don't have a position.
// If camera is moved into client, then camera position can be used
- s.ForEachAvatar(
+ s.ForEachRootScenePresence(
delegate(ScenePresence presence)
{
if (TrySendChatMessage(presence, fromPos, regionPos, fromID, fromName, c.Type, message, sourceType))
diff --git a/OpenSim/Region/CoreModules/World/Land/LandObject.cs b/OpenSim/Region/CoreModules/World/Land/LandObject.cs
index ff3b107..0da0de3 100644
--- a/OpenSim/Region/CoreModules/World/Land/LandObject.cs
+++ b/OpenSim/Region/CoreModules/World/Land/LandObject.cs
@@ -476,7 +476,7 @@ namespace OpenSim.Region.CoreModules.World.Land
public void SendLandUpdateToAvatarsOverMe(bool snap_selection)
{
- m_scene.ForEachAvatar(delegate(ScenePresence avatar)
+ m_scene.ForEachRootScenePresence(delegate(ScenePresence avatar)
{
ILandObject over = null;
try
diff --git a/OpenSim/Region/CoreModules/World/Sound/SoundModule.cs b/OpenSim/Region/CoreModules/World/Sound/SoundModule.cs
index fcbc159..93b1005 100644
--- a/OpenSim/Region/CoreModules/World/Sound/SoundModule.cs
+++ b/OpenSim/Region/CoreModules/World/Sound/SoundModule.cs
@@ -70,7 +70,7 @@ namespace OpenSim.Region.CoreModules.World.Sound
SceneObjectGroup grp = part.ParentGroup;
- m_scene.ForEachAvatar(delegate(ScenePresence sp)
+ m_scene.ForEachRootScenePresence(delegate(ScenePresence sp)
{
double dis = Util.GetDistanceTo(sp.AbsolutePosition, position);
if (dis > 100.0) // Max audio distance
@@ -119,7 +119,7 @@ namespace OpenSim.Region.CoreModules.World.Sound
}
}
- m_scene.ForEachAvatar(delegate(ScenePresence sp)
+ m_scene.ForEachRootScenePresence(delegate(ScenePresence sp)
{
double dis = Util.GetDistanceTo(sp.AbsolutePosition, position);
if (dis > 100.0) // Max audio distance
diff --git a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs
index cd4d7e3..00d7d55 100644
--- a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs
+++ b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs
@@ -401,7 +401,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
}
else
{
- m_scene.ForEachAvatar(delegate(ScenePresence sp)
+ m_scene.ForEachRootScenePresence(delegate(ScenePresence sp)
{
// Don't send a green dot for yourself
if (sp.UUID != remoteClient.AgentId)
@@ -1180,7 +1180,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
else
{
OSDArray responsearr = new OSDArray(m_scene.GetRootAgentCount());
- m_scene.ForEachAvatar(delegate(ScenePresence sp)
+ m_scene.ForEachRootScenePresence(delegate(ScenePresence sp)
{
OSDMap responsemapdata = new OSDMap();
responsemapdata["X"] = OSD.FromInteger((int)(xstart + sp.AbsolutePosition.X));
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index b996e86..0832975 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -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.
///
///
- public void ForEachAvatar(Action action)
+ public void ForEachRootScenePresence(Action action)
{
if(m_sceneGraph != null)
{
@@ -4326,7 +4326,7 @@ namespace OpenSim.Region.Framework.Scenes
///
public void ForEachRootClient(Action action)
{
- ForEachAvatar(delegate(ScenePresence presence)
+ ForEachRootScenePresence(delegate(ScenePresence presence)
{
action(presence.ControllingClient);
});
diff --git a/OpenSim/Region/Framework/Scenes/SceneManager.cs b/OpenSim/Region/Framework/Scenes/SceneManager.cs
index 9b72bee..eeb087f 100644
--- a/OpenSim/Region/Framework/Scenes/SceneManager.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneManager.cs
@@ -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);
});
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
index 3c80eb5..ef2682f 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
@@ -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();
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index 1a709e9..b77f1b6 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -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);
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index 5fc597c..f6df3c3 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -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)
diff --git a/OpenSim/Region/OptionalModules/Avatar/Appearance/AppearanceInfoModule.cs b/OpenSim/Region/OptionalModules/Avatar/Appearance/AppearanceInfoModule.cs
index 5a3a62f..28f04b3 100644
--- a/OpenSim/Region/OptionalModules/Avatar/Appearance/AppearanceInfoModule.cs
+++ b/OpenSim/Region/OptionalModules/Avatar/Appearance/AppearanceInfoModule.cs
@@ -112,7 +112,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Appearance
{
foreach (Scene scene in m_scenes.Values)
{
- scene.ForEachAvatar(sp => scene.AvatarFactory.SendAppearance(sp.UUID));
+ scene.ForEachRootScenePresence(sp => scene.AvatarFactory.SendAppearance(sp.UUID));
}
}
}
@@ -123,7 +123,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Appearance
{
foreach (Scene scene in m_scenes.Values)
{
- scene.ForEachAvatar(
+ scene.ForEachRootScenePresence(
delegate(ScenePresence sp)
{
bool bakedTextureValid = scene.AvatarFactory.ValidateBakedTextureCache(sp);
diff --git a/OpenSim/Region/OptionalModules/Avatar/Concierge/ConciergeModule.cs b/OpenSim/Region/OptionalModules/Avatar/Concierge/ConciergeModule.cs
index bea5807..e22618d 100644
--- a/OpenSim/Region/OptionalModules/Avatar/Concierge/ConciergeModule.cs
+++ b/OpenSim/Region/OptionalModules/Avatar/Concierge/ConciergeModule.cs
@@ -373,7 +373,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Concierge
scene.GetRootAgentCount(), scene.RegionInfo.RegionName,
scene.RegionInfo.RegionID,
DateTime.UtcNow.ToString("s")));
- scene.ForEachAvatar(delegate(ScenePresence sp)
+ scene.ForEachRootScenePresence(delegate(ScenePresence sp)
{
list.Append(String.Format(" \n", sp.Name, sp.UUID));
list.Append("");
diff --git a/OpenSim/Region/RegionCombinerModule/RegionCombinerModule.cs b/OpenSim/Region/RegionCombinerModule/RegionCombinerModule.cs
index 33abae2..92cbbc6 100644
--- a/OpenSim/Region/RegionCombinerModule/RegionCombinerModule.cs
+++ b/OpenSim/Region/RegionCombinerModule/RegionCombinerModule.cs
@@ -711,7 +711,7 @@ namespace OpenSim.Region.RegionCombinerModule
List CoarseLocations = new List();
List AvatarUUIDs = new List();
- connectiondata.RegionScene.ForEachAvatar(delegate(ScenePresence sp)
+ connectiondata.RegionScene.ForEachRootScenePresence(delegate(ScenePresence sp)
{
if (sp.UUID != presence.UUID)
{
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index d2ddcef..5ed8c47 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -3740,7 +3740,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
m_host.AddScriptLPS(1);
List keytable = new List();
// parse for sitting avatare-uuids
- World.ForEachAvatar(delegate(ScenePresence presence)
+ World.ForEachRootScenePresence(delegate(ScenePresence presence)
{
if (presence.ParentID != 0 && m_host.ParentGroup.HasChildPrim(presence.ParentID))
keytable.Add(presence.UUID);
@@ -3802,7 +3802,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
m_host.AddScriptLPS(1);
// parse for sitting avatare-names
List nametable = new List();
- World.ForEachAvatar(delegate(ScenePresence presence)
+ World.ForEachRootScenePresence(delegate(ScenePresence presence)
{
if (presence.ParentID != 0 && m_host.ParentGroup.HasChildPrim(presence.ParentID))
nametable.Add(presence.ControllingClient.Name);
@@ -7611,7 +7611,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
{
m_host.AddScriptLPS(1);
int avatarCount = 0;
- World.ForEachAvatar(delegate(ScenePresence presence)
+ World.ForEachRootScenePresence(delegate(ScenePresence presence)
{
if (presence.ParentID != 0 && m_host.ParentGroup.HasChildPrim(presence.ParentID))
avatarCount++;
@@ -9379,7 +9379,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
landObject.SetMediaUrl(url);
// now send to all (non-child) agents in the parcel
- World.ForEachAvatar(delegate(ScenePresence sp)
+ World.ForEachRootScenePresence(delegate(ScenePresence sp)
{
if (sp.currentParcelUUID == landData.GlobalID)
{
@@ -9412,7 +9412,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
if (presence == null)
{
// send to all (non-child) agents in the parcel
- World.ForEachAvatar(delegate(ScenePresence sp)
+ World.ForEachRootScenePresence(delegate(ScenePresence sp)
{
if (sp.currentParcelUUID == landData.GlobalID)
{
@@ -10527,7 +10527,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
if (checkAgents)
{
- World.ForEachAvatar(delegate(ScenePresence sp)
+ World.ForEachRootScenePresence(delegate(ScenePresence sp)
{
if (sp.AbsolutePosition.ApproxEquals(posToCheck, sp.PhysicsActor.Size.X))
{
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
index 3138131..f3206ac 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
@@ -873,7 +873,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
CheckThreatLevel(ThreatLevel.None, "osGetAgents");
LSL_List result = new LSL_List();
- World.ForEachAvatar(delegate(ScenePresence sp)
+ World.ForEachRootScenePresence(delegate(ScenePresence sp)
{
result.Add(new LSL_String(sp.Name));
});
@@ -2581,7 +2581,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
CheckThreatLevel(ThreatLevel.Severe, "osKickAvatar");
if (World.Permissions.CanRunConsoleCommand(m_host.OwnerID))
{
- World.ForEachAvatar(delegate(ScenePresence sp)
+ World.ForEachRootScenePresence(delegate(ScenePresence sp)
{
if (sp.Firstname == FirstName && sp.Lastname == SurName)
{
@@ -2715,7 +2715,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
CheckThreatLevel(ThreatLevel.None, "osGetAvatarList");
LSL_List result = new LSL_List();
- World.ForEachAvatar(delegate (ScenePresence avatar)
+ World.ForEachRootScenePresence(delegate (ScenePresence avatar)
{
if (avatar != null && avatar.UUID != m_host.OwnerID)
{
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs
index eb05f16..5527d14 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs
@@ -507,7 +507,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
senseEntity(sp);
if ((ts.type & AGENT_BY_USERNAME) != 0)
{
- m_CmdManager.m_ScriptEngine.World.ForEachAvatar(
+ m_CmdManager.m_ScriptEngine.World.ForEachRootScenePresence(
delegate (ScenePresence ssp)
{
if (ssp.Lastname == "Resident")
@@ -526,7 +526,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
}
else
{
- m_CmdManager.m_ScriptEngine.World.ForEachAvatar(senseEntity);
+ m_CmdManager.m_ScriptEngine.World.ForEachRootScenePresence(senseEntity);
}
return sensedEntities;
}
--
cgit v1.1