aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/Scene.cs
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2011-10-28 23:16:46 +0100
committerJustin Clark-Casey (justincc)2011-10-28 23:16:46 +0100
commit0fe756e42c23dabf3b754f3675597aaf6fb627c4 (patch)
treeaa9ebe244f7efe03b8e8cbf80a70b6fb34a6dade /OpenSim/Region/Framework/Scenes/Scene.cs
parentfetch SOP.RotationOffset once in UpdateRotation() and compare rather than fet... (diff)
parentRemoved use of 'is' operator and casting to find the root ScenePresence in Me... (diff)
downloadopensim-SC_OLD-0fe756e42c23dabf3b754f3675597aaf6fb627c4.zip
opensim-SC_OLD-0fe756e42c23dabf3b754f3675597aaf6fb627c4.tar.gz
opensim-SC_OLD-0fe756e42c23dabf3b754f3675597aaf6fb627c4.tar.bz2
opensim-SC_OLD-0fe756e42c23dabf3b754f3675597aaf6fb627c4.tar.xz
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Scene.cs')
-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 e43185d..302103a 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -893,22 +893,17 @@ namespace OpenSim.Region.Framework.Scenes
893 893
894 try 894 try
895 { 895 {
896 ForEachScenePresence(delegate(ScenePresence agent) 896 ForEachRootScenePresence(delegate(ScenePresence agent)
897 { 897 {
898 // If agent is a root agent. 898 //agent.ControllingClient.new
899 if (!agent.IsChildAgent) 899 //this.CommsManager.InterRegion.InformRegionOfChildAgent(otherRegion.RegionHandle, agent.ControllingClient.RequestClientInfo());
900 { 900
901 //agent.ControllingClient.new 901 List<ulong> old = new List<ulong>();
902 //this.CommsManager.InterRegion.InformRegionOfChildAgent(otherRegion.RegionHandle, agent.ControllingClient.RequestClientInfo()); 902 old.Add(otherRegion.RegionHandle);
903 903 agent.DropOldNeighbours(old);
904 List<ulong> old = new List<ulong>(); 904 if (m_teleportModule != null)
905 old.Add(otherRegion.RegionHandle); 905 m_teleportModule.EnableChildAgent(agent, otherRegion);
906 agent.DropOldNeighbours(old); 906 });
907 if (m_teleportModule != null)
908 m_teleportModule.EnableChildAgent(agent, otherRegion);
909 }
910 }
911 );
912 } 907 }
913 catch (NullReferenceException) 908 catch (NullReferenceException)
914 { 909 {
@@ -1043,16 +1038,11 @@ namespace OpenSim.Region.Framework.Scenes
1043 GridRegion r = new GridRegion(region); 1038 GridRegion r = new GridRegion(region);
1044 try 1039 try
1045 { 1040 {
1046 ForEachScenePresence(delegate(ScenePresence agent) 1041 ForEachRootScenePresence(delegate(ScenePresence agent)
1047 { 1042 {
1048 // If agent is a root agent. 1043 if (m_teleportModule != null)
1049 if (!agent.IsChildAgent) 1044 m_teleportModule.EnableChildAgent(agent, r);
1050 { 1045 });
1051 if (m_teleportModule != null)
1052 m_teleportModule.EnableChildAgent(agent, r);
1053 }
1054 }
1055 );
1056 } 1046 }
1057 catch (NullReferenceException) 1047 catch (NullReferenceException)
1058 { 1048 {
@@ -1456,11 +1446,10 @@ namespace OpenSim.Region.Framework.Scenes
1456 /// <param name="stats">Stats on the Simulator's performance</param> 1446 /// <param name="stats">Stats on the Simulator's performance</param>
1457 private void SendSimStatsPackets(SimStats stats) 1447 private void SendSimStatsPackets(SimStats stats)
1458 { 1448 {
1459 ForEachScenePresence( 1449 ForEachRootScenePresence(
1460 delegate(ScenePresence agent) 1450 delegate(ScenePresence agent)
1461 { 1451 {
1462 if (!agent.IsChildAgent) 1452 agent.ControllingClient.SendSimStats(stats);
1463 agent.ControllingClient.SendSimStats(stats);
1464 } 1453 }
1465 ); 1454 );
1466 } 1455 }
@@ -4290,6 +4279,19 @@ namespace OpenSim.Region.Framework.Scenes
4290 } 4279 }
4291 4280
4292 /// <summary> 4281 /// <summary>
4282 /// Performs action on all ROOT (not child) scene presences.
4283 /// This is just a shortcut function since frequently actions only appy to root SPs
4284 /// </summary>
4285 /// <param name="action"></param>
4286 public void ForEachRootScenePresence(Action<ScenePresence> action)
4287 {
4288 if(m_sceneGraph != null)
4289 {
4290 m_sceneGraph.ForEachRootScenePresence(action);
4291 }
4292 }
4293
4294 /// <summary>
4293 /// Performs action on all scene presences. 4295 /// Performs action on all scene presences.
4294 /// </summary> 4296 /// </summary>
4295 /// <param name="action"></param> 4297 /// <param name="action"></param>