aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/Framework/EntityTransfer
diff options
context:
space:
mode:
authorMelanie2013-08-11 17:31:25 +0100
committerMelanie2013-08-11 17:31:25 +0100
commitad1b2902f247a998f23e0d677ee50b10ab306396 (patch)
tree34dadb17811f2fba2f41595ce040e8a9352acc18 /OpenSim/Region/CoreModules/Framework/EntityTransfer
parentMerge branch 'master' into careminster (diff)
parentStats treaking. Update ToOSDMap for Stat and PercentageStat to return (diff)
downloadopensim-SC-ad1b2902f247a998f23e0d677ee50b10ab306396.zip
opensim-SC-ad1b2902f247a998f23e0d677ee50b10ab306396.tar.gz
opensim-SC-ad1b2902f247a998f23e0d677ee50b10ab306396.tar.bz2
opensim-SC-ad1b2902f247a998f23e0d677ee50b10ab306396.tar.xz
Merge branch 'master' into careminster
Conflicts: OpenSim/Region/Application/OpenSimBase.cs OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs OpenSim/Region/Framework/Scenes/Scene.cs OpenSim/Region/Framework/Scenes/ScenePresence.cs
Diffstat (limited to 'OpenSim/Region/CoreModules/Framework/EntityTransfer')
-rw-r--r--OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs30
1 files changed, 19 insertions, 11 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
index 4286eef..711167f 100644
--- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
@@ -1069,8 +1069,18 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1069 // Now let's make it officially a child agent 1069 // Now let's make it officially a child agent
1070 sp.MakeChildAgent(); 1070 sp.MakeChildAgent();
1071 1071
1072 // Finally, let's close this previously-known-as-root agent, when the jump is outside the view zone 1072 // May still need to signal neighbours whether child agents may need closing irrespective of whether this
1073 // one needed closing. Neighbour regions also contain logic to prevent a close if a subsequent move or
1074 // teleport re-established the child connection.
1075 //
1076 // It may be possible to also close child agents after a pause but one needs to be very careful about
1077 // race conditions between different regions on rapid teleporting (e.g. from A1 to a non-neighbour B, back
1078 // to a neighbour A2 then off to a non-neighbour C. Also, closing child agents early may be more compatible
1079 // with complicated scenarios where there a mixture of V1 and V2 teleports, though this is conjecture. It's
1080 // easier to close immediately and greatly reduce the scope of race conditions if possible.
1081 sp.CloseChildAgents(newRegionX, newRegionY);
1073 1082
1083 // Finally, let's close this previously-known-as-root agent, when the jump is outside the view zone
1074 if (NeedsClosing(sp.DrawDistance, oldRegionX, newRegionX, oldRegionY, newRegionY, reg)) 1084 if (NeedsClosing(sp.DrawDistance, oldRegionX, newRegionX, oldRegionY, newRegionY, reg))
1075 { 1085 {
1076 sp.DoNotCloseAfterTeleport = false; 1086 sp.DoNotCloseAfterTeleport = false;
@@ -1086,14 +1096,12 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1086 if (!sp.DoNotCloseAfterTeleport) 1096 if (!sp.DoNotCloseAfterTeleport)
1087 { 1097 {
1088 // OK, it got this agent. Let's close everything 1098 // OK, it got this agent. Let's close everything
1089 m_log.DebugFormat("[ENTITY TRANSFER MODULE]: Closing in agent {0} in region {1}", sp.Name, Scene.Name); 1099 m_log.DebugFormat("[ENTITY TRANSFER MODULE]: Closing agent {0} in {1}", sp.Name, Scene.Name);
1090 sp.CloseChildAgents(newRegionX, newRegionY);
1091 sp.Scene.IncomingCloseAgent(sp.UUID, false); 1100 sp.Scene.IncomingCloseAgent(sp.UUID, false);
1092
1093 } 1101 }
1094 else 1102 else
1095 { 1103 {
1096 m_log.DebugFormat("[ENTITY TRANSFER MODULE]: Not closing agent {0}, user is back in {0}", sp.Name, Scene.Name); 1104 m_log.DebugFormat("[ENTITY TRANSFER MODULE]: Not closing agent {0}, user is back in {1}", sp.Name, Scene.Name);
1097 sp.DoNotCloseAfterTeleport = false; 1105 sp.DoNotCloseAfterTeleport = false;
1098 } 1106 }
1099 } 1107 }
@@ -1836,10 +1844,10 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1836 List<ulong> newRegions = NewNeighbours(neighbourHandles, previousRegionNeighbourHandles); 1844 List<ulong> newRegions = NewNeighbours(neighbourHandles, previousRegionNeighbourHandles);
1837 List<ulong> oldRegions = OldNeighbours(neighbourHandles, previousRegionNeighbourHandles); 1845 List<ulong> oldRegions = OldNeighbours(neighbourHandles, previousRegionNeighbourHandles);
1838 1846
1839 //Dump("Current Neighbors", neighbourHandles); 1847// Dump("Current Neighbors", neighbourHandles);
1840 //Dump("Previous Neighbours", previousRegionNeighbourHandles); 1848// Dump("Previous Neighbours", previousRegionNeighbourHandles);
1841 //Dump("New Neighbours", newRegions); 1849// Dump("New Neighbours", newRegions);
1842 //Dump("Old Neighbours", oldRegions); 1850// Dump("Old Neighbours", oldRegions);
1843 1851
1844 /// Update the scene presence's known regions here on this region 1852 /// Update the scene presence's known regions here on this region
1845 sp.DropOldNeighbours(oldRegions); 1853 sp.DropOldNeighbours(oldRegions);
@@ -1847,8 +1855,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1847 /// Collect as many seeds as possible 1855 /// Collect as many seeds as possible
1848 Dictionary<ulong, string> seeds; 1856 Dictionary<ulong, string> seeds;
1849 if (sp.Scene.CapsModule != null) 1857 if (sp.Scene.CapsModule != null)
1850 seeds 1858 seeds = new Dictionary<ulong, string>(sp.Scene.CapsModule.GetChildrenSeeds(sp.UUID));
1851 = new Dictionary<ulong, string>(sp.Scene.CapsModule.GetChildrenSeeds(sp.UUID));
1852 else 1859 else
1853 seeds = new Dictionary<ulong, string>(); 1860 seeds = new Dictionary<ulong, string>();
1854 1861
@@ -1918,6 +1925,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1918 newAgent = true; 1925 newAgent = true;
1919 else 1926 else
1920 newAgent = false; 1927 newAgent = false;
1928// continue;
1921 1929
1922 if (neighbour.RegionHandle != sp.Scene.RegionInfo.RegionHandle) 1930 if (neighbour.RegionHandle != sp.Scene.RegionInfo.RegionHandle)
1923 { 1931 {