diff options
-rw-r--r-- | OpenSim/Framework/VersionInfo.cs | 4 | ||||
-rw-r--r-- | OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs | 72 |
2 files changed, 39 insertions, 37 deletions
diff --git a/OpenSim/Framework/VersionInfo.cs b/OpenSim/Framework/VersionInfo.cs index eac5aae..ac1f3a0 100644 --- a/OpenSim/Framework/VersionInfo.cs +++ b/OpenSim/Framework/VersionInfo.cs | |||
@@ -85,8 +85,8 @@ namespace OpenSim | |||
85 | /// - this is an older teleport protocol used in OpenSimulator 0.7.5 and before. | 85 | /// - this is an older teleport protocol used in OpenSimulator 0.7.5 and before. |
86 | /// </remarks> | 86 | /// </remarks> |
87 | public readonly static float SimulationServiceVersionAcceptedMin = 0.3f; | 87 | public readonly static float SimulationServiceVersionAcceptedMin = 0.3f; |
88 | public readonly static float SimulationServiceVersionAcceptedMax = 0.6f; | 88 | public readonly static float SimulationServiceVersionAcceptedMax = 0.7f; |
89 | public readonly static float SimulationServiceVersionSupportedMin = 0.3f; | 89 | public readonly static float SimulationServiceVersionSupportedMin = 0.3f; |
90 | public readonly static float SimulationServiceVersionSupportedMax = 0.6f; | 90 | public readonly static float SimulationServiceVersionSupportedMax = 0.7f; |
91 | } | 91 | } |
92 | } | 92 | } |
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs index 059cd6a..75e7916 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs | |||
@@ -1098,13 +1098,17 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
1098 | { | 1098 | { |
1099 | ulong destinationHandle = finalDestination.RegionHandle; | 1099 | ulong destinationHandle = finalDestination.RegionHandle; |
1100 | 1100 | ||
1101 | List<ulong> childRegionsToClose = sp.GetChildAgentsToClose(destinationHandle, finalDestination.RegionSizeX, finalDestination.RegionSizeY); | 1101 | List<ulong> childRegionsToClose = null; |
1102 | 1102 | if (ctx.OutboundVersion < 0.7) | |
1103 | if(agentCircuit.ChildrenCapSeeds != null) | ||
1104 | { | 1103 | { |
1105 | foreach(ulong handler in childRegionsToClose) | 1104 | childRegionsToClose = sp.GetChildAgentsToClose(destinationHandle, finalDestination.RegionSizeX, finalDestination.RegionSizeY); |
1105 | |||
1106 | if(agentCircuit.ChildrenCapSeeds != null) | ||
1106 | { | 1107 | { |
1107 | agentCircuit.ChildrenCapSeeds.Remove(handler); | 1108 | foreach(ulong handler in childRegionsToClose) |
1109 | { | ||
1110 | agentCircuit.ChildrenCapSeeds.Remove(handler); | ||
1111 | } | ||
1108 | } | 1112 | } |
1109 | } | 1113 | } |
1110 | 1114 | ||
@@ -1214,47 +1218,37 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
1214 | 1218 | ||
1215 | m_entityTransferStateMachine.UpdateInTransit(sp.UUID, AgentTransferState.CleaningUp); | 1219 | m_entityTransferStateMachine.UpdateInTransit(sp.UUID, AgentTransferState.CleaningUp); |
1216 | 1220 | ||
1217 | /* now some viewers also need time bf closing child regions | ||
1218 | * so this is moved down and delay added | ||
1219 | |||
1220 | if (logout) | ||
1221 | sp.closeAllChildAgents(); | ||
1222 | else | ||
1223 | sp.CloseChildAgents(childRegionsToClose); | ||
1224 | */ | ||
1225 | |||
1226 | sp.HasMovedAway(!(OutSideViewRange || logout)); | 1221 | sp.HasMovedAway(!(OutSideViewRange || logout)); |
1227 | 1222 | ||
1228 | //HG hook | 1223 | //HG hook |
1229 | AgentHasMovedAway(sp, logout); | 1224 | AgentHasMovedAway(sp, logout); |
1230 | 1225 | ||
1231 | // ulong sourceRegionHandle = sp.RegionHandle; | ||
1232 | |||
1233 | // Now let's make it officially a child agent | 1226 | // Now let's make it officially a child agent |
1234 | sp.MakeChildAgent(destinationHandle); | 1227 | sp.MakeChildAgent(destinationHandle); |
1235 | 1228 | ||
1236 | Thread.Sleep(2800); | 1229 | if(ctx.OutboundVersion < 0.7) |
1237 | |||
1238 | if (logout) | ||
1239 | sp.closeAllChildAgents(); | ||
1240 | else | ||
1241 | sp.CloseChildAgents(childRegionsToClose); | ||
1242 | |||
1243 | // Finally, let's close this previously-known-as-root agent, when the jump is outside the view zone | ||
1244 | // goes by HG hook | ||
1245 | if (NeedsClosing(reg, OutSideViewRange)) | ||
1246 | { | 1230 | { |
1247 | if (!sp.Scene.IncomingPreCloseClient(sp)) | 1231 | if (logout) |
1232 | sp.closeAllChildAgents(); | ||
1233 | else | ||
1234 | sp.CloseChildAgents(childRegionsToClose); | ||
1235 | |||
1236 | // Finally, let's close this previously-known-as-root agent, when the jump is outside the view zone | ||
1237 | // goes by HG hook | ||
1238 | if (NeedsClosing(reg, OutSideViewRange)) | ||
1248 | { | 1239 | { |
1249 | sp.IsInTransit = false; | 1240 | if (!sp.Scene.IncomingPreCloseClient(sp)) |
1250 | return; | 1241 | { |
1251 | } | 1242 | sp.IsInTransit = false; |
1243 | return; | ||
1244 | } | ||
1252 | 1245 | ||
1253 | // viewers and target region take extra time to process the tp | 1246 | // viewers and target region take extra time to process the tp |
1254 | // Thread.Sleep(2000); | 1247 | Thread.Sleep(15000); |
1255 | m_log.DebugFormat( | 1248 | m_log.DebugFormat( |
1256 | "[ENTITY TRANSFER MODULE]: Closing agent {0} in {1} after teleport", sp.Name, Scene.Name); | 1249 | "[ENTITY TRANSFER MODULE]: Closing agent {0} in {1} after teleport", sp.Name, Scene.Name); |
1257 | sp.Scene.CloseAgent(sp.UUID, false); | 1250 | sp.Scene.CloseAgent(sp.UUID, false); |
1251 | } | ||
1258 | } | 1252 | } |
1259 | sp.IsInTransit = false; | 1253 | sp.IsInTransit = false; |
1260 | } | 1254 | } |
@@ -2083,11 +2077,13 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
2083 | List<AgentCircuitData> cagents = new List<AgentCircuitData>(); | 2077 | List<AgentCircuitData> cagents = new List<AgentCircuitData>(); |
2084 | List<ulong> newneighbours = new List<ulong>(); | 2078 | List<ulong> newneighbours = new List<ulong>(); |
2085 | 2079 | ||
2080 | bool notHG = (sp.TeleportFlags & Constants.TeleportFlags.ViaHGLogin) != 0; | ||
2081 | |||
2086 | foreach (GridRegion neighbour in neighbours) | 2082 | foreach (GridRegion neighbour in neighbours) |
2087 | { | 2083 | { |
2088 | ulong handler = neighbour.RegionHandle; | 2084 | ulong handler = neighbour.RegionHandle; |
2089 | 2085 | ||
2090 | if (previousRegionNeighbourHandles.Contains(handler)) | 2086 | if (notHG && previousRegionNeighbourHandles.Contains(handler)) |
2091 | { | 2087 | { |
2092 | // agent already knows this region | 2088 | // agent already knows this region |
2093 | previousRegionNeighbourHandles.Remove(handler); | 2089 | previousRegionNeighbourHandles.Remove(handler); |
@@ -2163,6 +2159,12 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
2163 | int count = 0; | 2159 | int count = 0; |
2164 | IPEndPoint ipe; | 2160 | IPEndPoint ipe; |
2165 | 2161 | ||
2162 | if(previousRegionNeighbourHandles.Count > 0) | ||
2163 | { | ||
2164 | List<ulong> toclose = new List<ulong>(previousRegionNeighbourHandles); | ||
2165 | sp.CloseChildAgents(toclose); | ||
2166 | } | ||
2167 | |||
2166 | foreach (GridRegion neighbour in neighbours) | 2168 | foreach (GridRegion neighbour in neighbours) |
2167 | { | 2169 | { |
2168 | ulong handler = neighbour.RegionHandle; | 2170 | ulong handler = neighbour.RegionHandle; |
@@ -2179,7 +2181,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
2179 | } | 2181 | } |
2180 | count++; | 2182 | count++; |
2181 | } | 2183 | } |
2182 | else if (!previousRegionNeighbourHandles.Contains(handler)) | 2184 | else if (notHG && !previousRegionNeighbourHandles.Contains(handler)) |
2183 | { | 2185 | { |
2184 | spScene.SimulationService.UpdateAgent(neighbour, agentpos); | 2186 | spScene.SimulationService.UpdateAgent(neighbour, agentpos); |
2185 | } | 2187 | } |