Continuation of previous checkin. Found more places where ForEachScenePresence can be changed to ForEachRootScenePresence.
parent
b98613091c
commit
06577d7299
|
@ -98,9 +98,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Dialog
|
||||||
|
|
||||||
public void SendGeneralAlert(string message)
|
public void SendGeneralAlert(string message)
|
||||||
{
|
{
|
||||||
m_scene.ForEachScenePresence(delegate(ScenePresence presence)
|
m_scene.ForEachRootScenePresence(delegate(ScenePresence presence)
|
||||||
{
|
{
|
||||||
if (!presence.IsChildAgent)
|
|
||||||
presence.ControllingClient.SendAlertMessage(message);
|
presence.ControllingClient.SendAlertMessage(message);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -163,9 +162,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Dialog
|
||||||
public void SendNotificationToUsersInRegion(
|
public void SendNotificationToUsersInRegion(
|
||||||
UUID fromAvatarID, string fromAvatarName, string message)
|
UUID fromAvatarID, string fromAvatarName, string message)
|
||||||
{
|
{
|
||||||
m_scene.ForEachScenePresence(delegate(ScenePresence presence)
|
m_scene.ForEachRootScenePresence(delegate(ScenePresence presence)
|
||||||
{
|
{
|
||||||
if (!presence.IsChildAgent)
|
|
||||||
presence.ControllingClient.SendBlueBoxMessage(fromAvatarID, fromAvatarName, message);
|
presence.ControllingClient.SendBlueBoxMessage(fromAvatarID, fromAvatarName, message);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -1440,9 +1440,8 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
if (volume < 0)
|
if (volume < 0)
|
||||||
volume = 0;
|
volume = 0;
|
||||||
|
|
||||||
m_parentGroup.Scene.ForEachScenePresence(delegate(ScenePresence sp)
|
m_parentGroup.Scene.ForEachRootScenePresence(delegate(ScenePresence sp)
|
||||||
{
|
{
|
||||||
if (!sp.IsChildAgent)
|
|
||||||
sp.ControllingClient.SendAttachedSoundGainChange(UUID, (float)volume);
|
sp.ControllingClient.SendAttachedSoundGainChange(UUID, (float)volume);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -2676,10 +2675,8 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
m_parentGroup.Scene.ForEachScenePresence(delegate(ScenePresence sp)
|
m_parentGroup.Scene.ForEachRootScenePresence(delegate(ScenePresence sp)
|
||||||
{
|
{
|
||||||
if (sp.IsChildAgent)
|
|
||||||
return;
|
|
||||||
if (!(Util.GetDistanceTo(sp.AbsolutePosition, AbsolutePosition) >= 100))
|
if (!(Util.GetDistanceTo(sp.AbsolutePosition, AbsolutePosition) >= 100))
|
||||||
sp.ControllingClient.SendPreLoadSound(objectID, objectID, soundID);
|
sp.ControllingClient.SendPreLoadSound(objectID, objectID, soundID);
|
||||||
});
|
});
|
||||||
|
|
|
@ -2598,12 +2598,8 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
public void SendOtherAgentsAvatarDataToMe()
|
public void SendOtherAgentsAvatarDataToMe()
|
||||||
{
|
{
|
||||||
int count = 0;
|
int count = 0;
|
||||||
m_scene.ForEachScenePresence(delegate(ScenePresence scenePresence)
|
m_scene.ForEachRootScenePresence(delegate(ScenePresence scenePresence)
|
||||||
{
|
{
|
||||||
// only send information about root agents
|
|
||||||
if (scenePresence.IsChildAgent)
|
|
||||||
return;
|
|
||||||
|
|
||||||
// only send information about other root agents
|
// only send information about other root agents
|
||||||
if (scenePresence.UUID == UUID)
|
if (scenePresence.UUID == UUID)
|
||||||
return;
|
return;
|
||||||
|
@ -2645,6 +2641,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
int count = 0;
|
int count = 0;
|
||||||
m_scene.ForEachScenePresence(delegate(ScenePresence scenePresence)
|
m_scene.ForEachScenePresence(delegate(ScenePresence scenePresence)
|
||||||
{
|
{
|
||||||
|
// only send information to other root agents
|
||||||
if (scenePresence.UUID == UUID)
|
if (scenePresence.UUID == UUID)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -2664,12 +2661,8 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
//m_log.DebugFormat("[SCENE PRESENCE] SendOtherAgentsAppearanceToMe: {0} ({1})", Name, UUID);
|
//m_log.DebugFormat("[SCENE PRESENCE] SendOtherAgentsAppearanceToMe: {0} ({1})", Name, UUID);
|
||||||
|
|
||||||
int count = 0;
|
int count = 0;
|
||||||
m_scene.ForEachScenePresence(delegate(ScenePresence scenePresence)
|
m_scene.ForEachRootScenePresence(delegate(ScenePresence scenePresence)
|
||||||
{
|
{
|
||||||
// only send information about root agents
|
|
||||||
if (scenePresence.IsChildAgent)
|
|
||||||
return;
|
|
||||||
|
|
||||||
// only send information about other root agents
|
// only send information about other root agents
|
||||||
if (scenePresence.UUID == UUID)
|
if (scenePresence.UUID == UUID)
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -873,9 +873,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
CheckThreatLevel(ThreatLevel.None, "osGetAgents");
|
CheckThreatLevel(ThreatLevel.None, "osGetAgents");
|
||||||
|
|
||||||
LSL_List result = new LSL_List();
|
LSL_List result = new LSL_List();
|
||||||
World.ForEachScenePresence(delegate(ScenePresence sp)
|
World.ForEachRootScenePresence(delegate(ScenePresence sp)
|
||||||
{
|
{
|
||||||
if (!sp.IsChildAgent)
|
|
||||||
result.Add(new LSL_String(sp.Name));
|
result.Add(new LSL_String(sp.Name));
|
||||||
});
|
});
|
||||||
return result;
|
return result;
|
||||||
|
@ -2582,11 +2581,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
CheckThreatLevel(ThreatLevel.Severe, "osKickAvatar");
|
CheckThreatLevel(ThreatLevel.Severe, "osKickAvatar");
|
||||||
if (World.Permissions.CanRunConsoleCommand(m_host.OwnerID))
|
if (World.Permissions.CanRunConsoleCommand(m_host.OwnerID))
|
||||||
{
|
{
|
||||||
World.ForEachScenePresence(delegate(ScenePresence sp)
|
World.ForEachRootScenePresence(delegate(ScenePresence sp)
|
||||||
{
|
{
|
||||||
if (!sp.IsChildAgent &&
|
if (sp.Firstname == FirstName && sp.Lastname == SurName)
|
||||||
sp.Firstname == FirstName &&
|
|
||||||
sp.Lastname == SurName)
|
|
||||||
{
|
{
|
||||||
// kick client...
|
// kick client...
|
||||||
if (alert != null)
|
if (alert != null)
|
||||||
|
@ -2718,18 +2715,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
CheckThreatLevel(ThreatLevel.None, "osGetAvatarList");
|
CheckThreatLevel(ThreatLevel.None, "osGetAvatarList");
|
||||||
|
|
||||||
LSL_List result = new LSL_List();
|
LSL_List result = new LSL_List();
|
||||||
World.ForEachScenePresence(delegate (ScenePresence avatar)
|
World.ForEachRootScenePresence(delegate (ScenePresence avatar)
|
||||||
{
|
{
|
||||||
if (avatar != null && avatar.UUID != m_host.OwnerID)
|
if (avatar != null && avatar.UUID != m_host.OwnerID)
|
||||||
{
|
|
||||||
if (avatar.IsChildAgent == false)
|
|
||||||
{
|
{
|
||||||
result.Add(new LSL_String(avatar.UUID.ToString()));
|
result.Add(new LSL_String(avatar.UUID.ToString()));
|
||||||
OpenMetaverse.Vector3 ap = avatar.AbsolutePosition;
|
OpenMetaverse.Vector3 ap = avatar.AbsolutePosition;
|
||||||
result.Add(new LSL_Vector(ap.X, ap.Y, ap.Z));
|
result.Add(new LSL_Vector(ap.X, ap.Y, ap.Z));
|
||||||
result.Add(new LSL_String(avatar.Name));
|
result.Add(new LSL_String(avatar.Name));
|
||||||
}
|
}
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
|
Loading…
Reference in New Issue