diff options
author | UbitUmarov | 2019-03-28 00:02:24 +0000 |
---|---|---|
committer | UbitUmarov | 2019-03-28 00:02:24 +0000 |
commit | 1847a42a861d6a0f575c56f566b947dfb21c1f03 (patch) | |
tree | 5874efa262c9d8b651d35ef77230e67c8f14b58e /OpenSim/Region/Framework/Scenes/ScenePresence.cs | |
parent | try another way (diff) | |
download | opensim-SC-1847a42a861d6a0f575c56f566b947dfb21c1f03.zip opensim-SC-1847a42a861d6a0f575c56f566b947dfb21c1f03.tar.gz opensim-SC-1847a42a861d6a0f575c56f566b947dfb21c1f03.tar.bz2 opensim-SC-1847a42a861d6a0f575c56f566b947dfb21c1f03.tar.xz |
changes on teleports v7
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 69 |
1 files changed, 42 insertions, 27 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 2145fcd..a95036c 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -457,9 +457,10 @@ namespace OpenSim.Region.Framework.Scenes | |||
457 | #region For teleports and crossings callbacks | 457 | #region For teleports and crossings callbacks |
458 | 458 | ||
459 | /// <summary> | 459 | /// <summary> |
460 | /// In the V1 teleport protocol, the destination simulator sends ReleaseAgent to this address. | 460 | /// the destination simulator sends ReleaseAgent to this address, for very long range tps, HG. |
461 | /// </summary> | 461 | /// </summary> |
462 | private string m_callbackURI; | 462 | private string m_callbackURI; // to remove with v1 support |
463 | private string m_newCallbackURI; | ||
463 | 464 | ||
464 | /// <summary> | 465 | /// <summary> |
465 | /// Records the region from which this presence originated, if not from login. | 466 | /// Records the region from which this presence originated, if not from login. |
@@ -2155,28 +2156,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
2155 | m_log.DebugFormat("[CompleteMovement]: Missing COF for {0} is {1}", client.AgentId, COF); | 2156 | m_log.DebugFormat("[CompleteMovement]: Missing COF for {0} is {1}", client.AgentId, COF); |
2156 | } | 2157 | } |
2157 | 2158 | ||
2158 | if (!string.IsNullOrEmpty(m_callbackURI)) | ||
2159 | { | ||
2160 | // We cannot sleep here since this would hold up the inbound packet processing thread, as | ||
2161 | // CompleteMovement() is executed synchronously. However, it might be better to delay the release | ||
2162 | // here until we know for sure that the agent is active in this region. Sending AgentMovementComplete | ||
2163 | // is not enough for Imprudence clients - there appears to be a small delay (<200ms, <500ms) until they regard this | ||
2164 | // region as the current region, meaning that a close sent before then will fail the teleport. | ||
2165 | // System.Threading.Thread.Sleep(2000); | ||
2166 | |||
2167 | m_log.DebugFormat( | ||
2168 | "[SCENE PRESENCE]: Releasing {0} {1} with callback to {2}", | ||
2169 | client.Name, client.AgentId, m_callbackURI); | ||
2170 | |||
2171 | UUID originID; | ||
2172 | |||
2173 | lock (m_originRegionIDAccessLock) | ||
2174 | originID = m_originRegionID; | ||
2175 | |||
2176 | Scene.SimulationService.ReleaseAgent(originID, UUID, m_callbackURI); | ||
2177 | m_callbackURI = null; | ||
2178 | //m_log.DebugFormat("[CompleteMovement] ReleaseAgent: {0}ms", Util.EnvironmentTickCountSubtract(ts)); | ||
2179 | } | ||
2180 | } | 2159 | } |
2181 | // Tell the client that we're totally ready | 2160 | // Tell the client that we're totally ready |
2182 | ControllingClient.SendRegionHandshake(); | 2161 | ControllingClient.SendRegionHandshake(); |
@@ -2381,6 +2360,37 @@ namespace OpenSim.Region.Framework.Scenes | |||
2381 | 2360 | ||
2382 | //m_log.DebugFormat("[CompleteMovement] SendInitialDataToMe: {0}ms", Util.EnvironmentTickCountSubtract(ts)); | 2361 | //m_log.DebugFormat("[CompleteMovement] SendInitialDataToMe: {0}ms", Util.EnvironmentTickCountSubtract(ts)); |
2383 | 2362 | ||
2363 | if (!string.IsNullOrEmpty(m_callbackURI)) | ||
2364 | { | ||
2365 | m_log.DebugFormat( | ||
2366 | "[SCENE PRESENCE]: Releasing {0} {1} with old callback to {2}", | ||
2367 | client.Name, client.AgentId, m_callbackURI); | ||
2368 | |||
2369 | UUID originID; | ||
2370 | |||
2371 | lock (m_originRegionIDAccessLock) | ||
2372 | originID = m_originRegionID; | ||
2373 | |||
2374 | Scene.SimulationService.ReleaseAgent(originID, UUID, m_callbackURI); | ||
2375 | m_callbackURI = null; | ||
2376 | //m_log.DebugFormat("[CompleteMovement] ReleaseAgent: {0}ms", Util.EnvironmentTickCountSubtract(ts)); | ||
2377 | } | ||
2378 | else if (!string.IsNullOrEmpty(m_newCallbackURI)) | ||
2379 | { | ||
2380 | m_log.DebugFormat( | ||
2381 | "[SCENE PRESENCE]: Releasing {0} {1} with callback to {2}", | ||
2382 | client.Name, client.AgentId, m_newCallbackURI); | ||
2383 | |||
2384 | UUID originID; | ||
2385 | |||
2386 | lock (m_originRegionIDAccessLock) | ||
2387 | originID = m_originRegionID; | ||
2388 | |||
2389 | Scene.SimulationService.ReleaseAgent(originID, UUID, m_newCallbackURI); | ||
2390 | m_newCallbackURI = null; | ||
2391 | //m_log.DebugFormat("[CompleteMovement] ReleaseAgent: {0}ms", Util.EnvironmentTickCountSubtract(ts)); | ||
2392 | } | ||
2393 | |||
2384 | if (openChildAgents) | 2394 | if (openChildAgents) |
2385 | { | 2395 | { |
2386 | IFriendsModule friendsModule = m_scene.RequestModuleInterface<IFriendsModule>(); | 2396 | IFriendsModule friendsModule = m_scene.RequestModuleInterface<IFriendsModule>(); |
@@ -4589,12 +4599,15 @@ namespace OpenSim.Region.Framework.Scenes | |||
4589 | byebyeRegions.Add(handle); | 4599 | byebyeRegions.Add(handle); |
4590 | else if(handle == curRegionHandle) | 4600 | else if(handle == curRegionHandle) |
4591 | { | 4601 | { |
4602 | continue; | ||
4603 | /* | ||
4592 | RegionInfo curreg = m_scene.RegionInfo; | 4604 | RegionInfo curreg = m_scene.RegionInfo; |
4593 | if (Util.IsOutsideView(255, curreg.RegionLocX, newRegionX, curreg.RegionLocY, newRegionY, | 4605 | if (Util.IsOutsideView(255, curreg.RegionLocX, newRegionX, curreg.RegionLocY, newRegionY, |
4594 | (int)curreg.RegionSizeX, (int)curreg.RegionSizeX, newRegionSizeX, newRegionSizeY)) | 4606 | (int)curreg.RegionSizeX, (int)curreg.RegionSizeX, newRegionSizeX, newRegionSizeY)) |
4595 | { | 4607 | { |
4596 | byebyeRegions.Add(handle); | 4608 | byebyeRegions.Add(handle); |
4597 | } | 4609 | } |
4610 | */ | ||
4598 | } | 4611 | } |
4599 | else | 4612 | else |
4600 | { | 4613 | { |
@@ -4774,6 +4787,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
4774 | public void CopyTo(AgentData cAgent, bool isCrossUpdate) | 4787 | public void CopyTo(AgentData cAgent, bool isCrossUpdate) |
4775 | { | 4788 | { |
4776 | cAgent.CallbackURI = m_callbackURI; | 4789 | cAgent.CallbackURI = m_callbackURI; |
4790 | cAgent.NewCallbackURI = m_newCallbackURI; | ||
4777 | 4791 | ||
4778 | cAgent.AgentID = UUID; | 4792 | cAgent.AgentID = UUID; |
4779 | cAgent.RegionID = Scene.RegionInfo.RegionID; | 4793 | cAgent.RegionID = Scene.RegionInfo.RegionID; |
@@ -4860,9 +4874,10 @@ namespace OpenSim.Region.Framework.Scenes | |||
4860 | private void CopyFrom(AgentData cAgent) | 4874 | private void CopyFrom(AgentData cAgent) |
4861 | { | 4875 | { |
4862 | m_callbackURI = cAgent.CallbackURI; | 4876 | m_callbackURI = cAgent.CallbackURI; |
4863 | // m_log.DebugFormat( | 4877 | m_newCallbackURI = cAgent.NewCallbackURI; |
4864 | // "[SCENE PRESENCE]: Set callback for {0} in {1} to {2} in CopyFrom()", | 4878 | // m_log.DebugFormat( |
4865 | // Name, m_scene.RegionInfo.RegionName, m_callbackURI); | 4879 | // "[SCENE PRESENCE]: Set callback for {0} in {1} to {2} in CopyFrom()", |
4880 | // Name, m_scene.RegionInfo.RegionName, m_callbackURI); | ||
4866 | 4881 | ||
4867 | GodController.SetState(cAgent.GodData); | 4882 | GodController.SetState(cAgent.GodData); |
4868 | 4883 | ||