diff options
author | Justin Clark-Casey (justincc) | 2013-08-09 17:52:29 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2013-08-09 17:52:29 +0100 |
commit | 97bcb59bee8a744c967b85f5feee263793161325 (patch) | |
tree | 67ec4306424df40c53fe6942bf02af680da21cea /OpenSim/Region/CoreModules | |
parent | Merge branch 'master' of ssh://opensimulator.org/var/git/opensim (diff) | |
parent | Comment back out seed dump code enabled in b1c26a56. Also adds a few telepor... (diff) | |
download | opensim-SC_OLD-97bcb59bee8a744c967b85f5feee263793161325.zip opensim-SC_OLD-97bcb59bee8a744c967b85f5feee263793161325.tar.gz opensim-SC_OLD-97bcb59bee8a744c967b85f5feee263793161325.tar.bz2 opensim-SC_OLD-97bcb59bee8a744c967b85f5feee263793161325.tar.xz |
Merge branch 'TeleportWork'
Diffstat (limited to 'OpenSim/Region/CoreModules')
-rw-r--r-- | OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs | 30 | ||||
-rw-r--r-- | OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs | 6 |
2 files changed, 22 insertions, 14 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs index 01ef710..87f0264 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs | |||
@@ -1064,8 +1064,18 @@ 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 | // | ||
1071 | // It may be possible to also close child agents after a pause but one needs to be very careful about | ||
1072 | // race conditions between different regions on rapid teleporting (e.g. from A1 to a non-neighbour B, back | ||
1073 | // to a neighbour A2 then off to a non-neighbour C. Also, closing child agents early may be more compatible | ||
1074 | // with complicated scenarios where there a mixture of V1 and V2 teleports, though this is conjecture. It's | ||
1075 | // easier to close immediately and greatly reduce the scope of race conditions if possible. | ||
1076 | sp.CloseChildAgents(newRegionX, newRegionY); | ||
1068 | 1077 | ||
1078 | // 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)) | 1079 | if (NeedsClosing(sp.DrawDistance, oldRegionX, newRegionX, oldRegionY, newRegionY, reg)) |
1070 | { | 1080 | { |
1071 | sp.DoNotCloseAfterTeleport = false; | 1081 | sp.DoNotCloseAfterTeleport = false; |
@@ -1081,14 +1091,12 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
1081 | if (!sp.DoNotCloseAfterTeleport) | 1091 | if (!sp.DoNotCloseAfterTeleport) |
1082 | { | 1092 | { |
1083 | // OK, it got this agent. Let's close everything | 1093 | // 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); | 1094 | 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); | 1095 | sp.Scene.IncomingCloseAgent(sp.UUID, false); |
1087 | |||
1088 | } | 1096 | } |
1089 | else | 1097 | else |
1090 | { | 1098 | { |
1091 | m_log.DebugFormat("[ENTITY TRANSFER MODULE]: Not closing agent {0}, user is back in {0}", sp.Name, Scene.Name); | 1099 | m_log.DebugFormat("[ENTITY TRANSFER MODULE]: Not closing agent {0}, user is back in {1}", sp.Name, Scene.Name); |
1092 | sp.DoNotCloseAfterTeleport = false; | 1100 | sp.DoNotCloseAfterTeleport = false; |
1093 | } | 1101 | } |
1094 | } | 1102 | } |
@@ -1863,10 +1871,10 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
1863 | List<ulong> newRegions = NewNeighbours(neighbourHandles, previousRegionNeighbourHandles); | 1871 | List<ulong> newRegions = NewNeighbours(neighbourHandles, previousRegionNeighbourHandles); |
1864 | List<ulong> oldRegions = OldNeighbours(neighbourHandles, previousRegionNeighbourHandles); | 1872 | List<ulong> oldRegions = OldNeighbours(neighbourHandles, previousRegionNeighbourHandles); |
1865 | 1873 | ||
1866 | //Dump("Current Neighbors", neighbourHandles); | 1874 | // Dump("Current Neighbors", neighbourHandles); |
1867 | //Dump("Previous Neighbours", previousRegionNeighbourHandles); | 1875 | // Dump("Previous Neighbours", previousRegionNeighbourHandles); |
1868 | //Dump("New Neighbours", newRegions); | 1876 | // Dump("New Neighbours", newRegions); |
1869 | //Dump("Old Neighbours", oldRegions); | 1877 | // Dump("Old Neighbours", oldRegions); |
1870 | 1878 | ||
1871 | /// Update the scene presence's known regions here on this region | 1879 | /// Update the scene presence's known regions here on this region |
1872 | sp.DropOldNeighbours(oldRegions); | 1880 | sp.DropOldNeighbours(oldRegions); |
@@ -1874,8 +1882,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
1874 | /// Collect as many seeds as possible | 1882 | /// Collect as many seeds as possible |
1875 | Dictionary<ulong, string> seeds; | 1883 | Dictionary<ulong, string> seeds; |
1876 | if (sp.Scene.CapsModule != null) | 1884 | if (sp.Scene.CapsModule != null) |
1877 | seeds | 1885 | seeds = new Dictionary<ulong, string>(sp.Scene.CapsModule.GetChildrenSeeds(sp.UUID)); |
1878 | = new Dictionary<ulong, string>(sp.Scene.CapsModule.GetChildrenSeeds(sp.UUID)); | ||
1879 | else | 1886 | else |
1880 | seeds = new Dictionary<ulong, string>(); | 1887 | seeds = new Dictionary<ulong, string>(); |
1881 | 1888 | ||
@@ -1945,6 +1952,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
1945 | newAgent = true; | 1952 | newAgent = true; |
1946 | else | 1953 | else |
1947 | newAgent = false; | 1954 | newAgent = false; |
1955 | // continue; | ||
1948 | 1956 | ||
1949 | if (neighbour.RegionHandle != sp.Scene.RegionInfo.RegionHandle) | 1957 | if (neighbour.RegionHandle != sp.Scene.RegionInfo.RegionHandle) |
1950 | { | 1958 | { |
diff --git a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs index 121b2aa..31547a6 100644 --- a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs +++ b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs | |||
@@ -562,7 +562,7 @@ namespace OpenSim.Region.CoreModules.World.Estate | |||
562 | if (!Scene.TeleportClientHome(user, s.ControllingClient)) | 562 | if (!Scene.TeleportClientHome(user, s.ControllingClient)) |
563 | { | 563 | { |
564 | s.ControllingClient.Kick("Your access to the region was revoked and TP home failed - you have been logged out."); | 564 | s.ControllingClient.Kick("Your access to the region was revoked and TP home failed - you have been logged out."); |
565 | s.ControllingClient.Close(); | 565 | Scene.IncomingCloseAgent(s.UUID, false); |
566 | } | 566 | } |
567 | } | 567 | } |
568 | } | 568 | } |
@@ -797,7 +797,7 @@ namespace OpenSim.Region.CoreModules.World.Estate | |||
797 | if (!Scene.TeleportClientHome(prey, s.ControllingClient)) | 797 | if (!Scene.TeleportClientHome(prey, s.ControllingClient)) |
798 | { | 798 | { |
799 | s.ControllingClient.Kick("You were teleported home by the region owner, but the TP failed - you have been logged out."); | 799 | s.ControllingClient.Kick("You were teleported home by the region owner, but the TP failed - you have been logged out."); |
800 | s.ControllingClient.Close(); | 800 | Scene.IncomingCloseAgent(s.UUID, false); |
801 | } | 801 | } |
802 | } | 802 | } |
803 | } | 803 | } |
@@ -820,7 +820,7 @@ namespace OpenSim.Region.CoreModules.World.Estate | |||
820 | if (!Scene.TeleportClientHome(p.UUID, p.ControllingClient)) | 820 | if (!Scene.TeleportClientHome(p.UUID, p.ControllingClient)) |
821 | { | 821 | { |
822 | p.ControllingClient.Kick("You were teleported home by the region owner, but the TP failed - you have been logged out."); | 822 | p.ControllingClient.Kick("You were teleported home by the region owner, but the TP failed - you have been logged out."); |
823 | p.ControllingClient.Close(); | 823 | Scene.IncomingCloseAgent(p.UUID, false); |
824 | } | 824 | } |
825 | } | 825 | } |
826 | } | 826 | } |