aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs')
-rw-r--r--OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs48
1 files changed, 25 insertions, 23 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
index 01ef710..2f74253 100644
--- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
@@ -1064,8 +1064,12 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1064 // Now let's make it officially a child agent 1064 // Now let's make it officially a child agent
1065 sp.MakeChildAgent(); 1065 sp.MakeChildAgent();
1066 1066
1067 // Finally, let's close this previously-known-as-root agent, when the jump is outside the view zone 1067 // May still need to signal neighbours whether child agents may need closing irrespective of whether this
1068 // one needed closing. Neighbour regions also contain logic to prevent a close if a subsequent move or
1069 // teleport re-established the child connection.
1070 sp.CloseChildAgents(newRegionX, newRegionY);
1068 1071
1072 // Finally, let's close this previously-known-as-root agent, when the jump is outside the view zone
1069 if (NeedsClosing(sp.DrawDistance, oldRegionX, newRegionX, oldRegionY, newRegionY, reg)) 1073 if (NeedsClosing(sp.DrawDistance, oldRegionX, newRegionX, oldRegionY, newRegionY, reg))
1070 { 1074 {
1071 sp.DoNotCloseAfterTeleport = false; 1075 sp.DoNotCloseAfterTeleport = false;
@@ -1081,14 +1085,12 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1081 if (!sp.DoNotCloseAfterTeleport) 1085 if (!sp.DoNotCloseAfterTeleport)
1082 { 1086 {
1083 // OK, it got this agent. Let's close everything 1087 // OK, it got this agent. Let's close everything
1084 m_log.DebugFormat("[ENTITY TRANSFER MODULE]: Closing in agent {0} in region {1}", sp.Name, Scene.Name); 1088 m_log.DebugFormat("[ENTITY TRANSFER MODULE]: Closing agent {0} in {1}", sp.Name, Scene.Name);
1085 sp.CloseChildAgents(newRegionX, newRegionY);
1086 sp.Scene.IncomingCloseAgent(sp.UUID, false); 1089 sp.Scene.IncomingCloseAgent(sp.UUID, false);
1087
1088 } 1090 }
1089 else 1091 else
1090 { 1092 {
1091 m_log.DebugFormat("[ENTITY TRANSFER MODULE]: Not closing agent {0}, user is back in {0}", sp.Name, Scene.Name); 1093 m_log.DebugFormat("[ENTITY TRANSFER MODULE]: Not closing agent {0}, user is back in {1}", sp.Name, Scene.Name);
1092 sp.DoNotCloseAfterTeleport = false; 1094 sp.DoNotCloseAfterTeleport = false;
1093 } 1095 }
1094 } 1096 }
@@ -1863,10 +1865,10 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1863 List<ulong> newRegions = NewNeighbours(neighbourHandles, previousRegionNeighbourHandles); 1865 List<ulong> newRegions = NewNeighbours(neighbourHandles, previousRegionNeighbourHandles);
1864 List<ulong> oldRegions = OldNeighbours(neighbourHandles, previousRegionNeighbourHandles); 1866 List<ulong> oldRegions = OldNeighbours(neighbourHandles, previousRegionNeighbourHandles);
1865 1867
1866 //Dump("Current Neighbors", neighbourHandles); 1868 Dump("Current Neighbors", neighbourHandles);
1867 //Dump("Previous Neighbours", previousRegionNeighbourHandles); 1869 Dump("Previous Neighbours", previousRegionNeighbourHandles);
1868 //Dump("New Neighbours", newRegions); 1870 Dump("New Neighbours", newRegions);
1869 //Dump("Old Neighbours", oldRegions); 1871 Dump("Old Neighbours", oldRegions);
1870 1872
1871 /// Update the scene presence's known regions here on this region 1873 /// Update the scene presence's known regions here on this region
1872 sp.DropOldNeighbours(oldRegions); 1874 sp.DropOldNeighbours(oldRegions);
@@ -1874,8 +1876,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1874 /// Collect as many seeds as possible 1876 /// Collect as many seeds as possible
1875 Dictionary<ulong, string> seeds; 1877 Dictionary<ulong, string> seeds;
1876 if (sp.Scene.CapsModule != null) 1878 if (sp.Scene.CapsModule != null)
1877 seeds 1879 seeds = new Dictionary<ulong, string>(sp.Scene.CapsModule.GetChildrenSeeds(sp.UUID));
1878 = new Dictionary<ulong, string>(sp.Scene.CapsModule.GetChildrenSeeds(sp.UUID));
1879 else 1880 else
1880 seeds = new Dictionary<ulong, string>(); 1881 seeds = new Dictionary<ulong, string>();
1881 1882
@@ -1945,6 +1946,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1945 newAgent = true; 1946 newAgent = true;
1946 else 1947 else
1947 newAgent = false; 1948 newAgent = false;
1949// continue;
1948 1950
1949 if (neighbour.RegionHandle != sp.Scene.RegionInfo.RegionHandle) 1951 if (neighbour.RegionHandle != sp.Scene.RegionInfo.RegionHandle)
1950 { 1952 {
@@ -2178,18 +2180,18 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
2178 return handles; 2180 return handles;
2179 } 2181 }
2180 2182
2181// private void Dump(string msg, List<ulong> handles) 2183 private void Dump(string msg, List<ulong> handles)
2182// { 2184 {
2183// m_log.InfoFormat("-------------- HANDLE DUMP ({0}) ---------", msg); 2185 m_log.InfoFormat("-------------- HANDLE DUMP ({0}) ---------", msg);
2184// foreach (ulong handle in handles) 2186 foreach (ulong handle in handles)
2185// { 2187 {
2186// uint x, y; 2188 uint x, y;
2187// Utils.LongToUInts(handle, out x, out y); 2189 Utils.LongToUInts(handle, out x, out y);
2188// x = x / Constants.RegionSize; 2190 x = x / Constants.RegionSize;
2189// y = y / Constants.RegionSize; 2191 y = y / Constants.RegionSize;
2190// m_log.InfoFormat("({0}, {1})", x, y); 2192 m_log.InfoFormat("({0}, {1})", x, y);
2191// } 2193 }
2192// } 2194 }
2193 2195
2194 #endregion 2196 #endregion
2195 2197