aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/Scene.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs60
1 files changed, 31 insertions, 29 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index b2f5279..0cb6681 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -920,22 +920,17 @@ namespace OpenSim.Region.Framework.Scenes
920 920
921 try 921 try
922 { 922 {
923 ForEachScenePresence(delegate(ScenePresence agent) 923 ForEachRootScenePresence(delegate(ScenePresence agent)
924 { 924 {
925 // If agent is a root agent. 925 //agent.ControllingClient.new
926 if (!agent.IsChildAgent) 926 //this.CommsManager.InterRegion.InformRegionOfChildAgent(otherRegion.RegionHandle, agent.ControllingClient.RequestClientInfo());
927 { 927
928 //agent.ControllingClient.new 928 List<ulong> old = new List<ulong>();
929 //this.CommsManager.InterRegion.InformRegionOfChildAgent(otherRegion.RegionHandle, agent.ControllingClient.RequestClientInfo()); 929 old.Add(otherRegion.RegionHandle);
930 930 agent.DropOldNeighbours(old);
931 List<ulong> old = new List<ulong>(); 931 if (m_teleportModule != null)
932 old.Add(otherRegion.RegionHandle); 932 m_teleportModule.EnableChildAgent(agent, otherRegion);
933 agent.DropOldNeighbours(old); 933 });
934 if (m_teleportModule != null)
935 m_teleportModule.EnableChildAgent(agent, otherRegion);
936 }
937 }
938 );
939 } 934 }
940 catch (NullReferenceException) 935 catch (NullReferenceException)
941 { 936 {
@@ -1070,16 +1065,11 @@ namespace OpenSim.Region.Framework.Scenes
1070 GridRegion r = new GridRegion(region); 1065 GridRegion r = new GridRegion(region);
1071 try 1066 try
1072 { 1067 {
1073 ForEachScenePresence(delegate(ScenePresence agent) 1068 ForEachRootScenePresence(delegate(ScenePresence agent)
1074 { 1069 {
1075 // If agent is a root agent. 1070 if (m_teleportModule != null)
1076 if (!agent.IsChildAgent) 1071 m_teleportModule.EnableChildAgent(agent, r);
1077 { 1072 });
1078 if (m_teleportModule != null)
1079 m_teleportModule.EnableChildAgent(agent, r);
1080 }
1081 }
1082 );
1083 } 1073 }
1084 catch (NullReferenceException) 1074 catch (NullReferenceException)
1085 { 1075 {
@@ -1493,11 +1483,10 @@ namespace OpenSim.Region.Framework.Scenes
1493 /// <param name="stats">Stats on the Simulator's performance</param> 1483 /// <param name="stats">Stats on the Simulator's performance</param>
1494 private void SendSimStatsPackets(SimStats stats) 1484 private void SendSimStatsPackets(SimStats stats)
1495 { 1485 {
1496 ForEachScenePresence( 1486 ForEachRootScenePresence(
1497 delegate(ScenePresence agent) 1487 delegate(ScenePresence agent)
1498 { 1488 {
1499 if (!agent.IsChildAgent) 1489 agent.ControllingClient.SendSimStats(stats);
1500 agent.ControllingClient.SendSimStats(stats);
1501 } 1490 }
1502 ); 1491 );
1503 } 1492 }
@@ -4463,6 +4452,19 @@ namespace OpenSim.Region.Framework.Scenes
4463 } 4452 }
4464 4453
4465 /// <summary> 4454 /// <summary>
4455 /// Performs action on all ROOT (not child) scene presences.
4456 /// This is just a shortcut function since frequently actions only appy to root SPs
4457 /// </summary>
4458 /// <param name="action"></param>
4459 public void ForEachRootScenePresence(Action<ScenePresence> action)
4460 {
4461 if(m_sceneGraph != null)
4462 {
4463 m_sceneGraph.ForEachRootScenePresence(action);
4464 }
4465 }
4466
4467 /// <summary>
4466 /// Performs action on all scene presences. 4468 /// Performs action on all scene presences.
4467 /// </summary> 4469 /// </summary>
4468 /// <param name="action"></param> 4470 /// <param name="action"></param>