mirror of
https://github.com/opensim/opensim.git
synced 2026-08-10 19:36:07 +08:00
Added new ForEachRootScenePresence to Scene since almost every delegate passed to ForEachScenePresence checks for !IsChildAgent first. It consolidates child and root handling for coming refactors.
This commit is contained in:
@@ -658,17 +658,15 @@ namespace OpenSim.Region.CoreModules.World.Estate
|
||||
if (!Scene.Permissions.CanIssueEstateCommand(remover_client.AgentId, false))
|
||||
return;
|
||||
|
||||
Scene.ForEachScenePresence(delegate(ScenePresence sp)
|
||||
Scene.ForEachRootScenePresence(delegate(ScenePresence sp)
|
||||
{
|
||||
if (sp.UUID != senderID)
|
||||
{
|
||||
ScenePresence p = Scene.GetScenePresence(sp.UUID);
|
||||
// make sure they are still there, we could be working down a long list
|
||||
// Also make sure they are actually in the region
|
||||
if (p != null && !p.IsChildAgent)
|
||||
{
|
||||
ScenePresence p;
|
||||
if(Scene.TryGetScenePresence(sp.UUID, out p))
|
||||
Scene.TeleportClientHome(p.UUID, p.ControllingClient);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -929,10 +927,9 @@ namespace OpenSim.Region.CoreModules.World.Estate
|
||||
|
||||
public void sendRegionInfoPacketToAll()
|
||||
{
|
||||
Scene.ForEachScenePresence(delegate(ScenePresence sp)
|
||||
Scene.ForEachRootScenePresence(delegate(ScenePresence sp)
|
||||
{
|
||||
if (!sp.IsChildAgent)
|
||||
HandleRegionInfoRequest(sp.ControllingClient);
|
||||
HandleRegionInfoRequest(sp.ControllingClient);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user