diff options
author | Melanie Thielker | 2008-11-30 23:36:56 +0000 |
---|---|---|
committer | Melanie Thielker | 2008-11-30 23:36:56 +0000 |
commit | d1841ca94d382215a40a7433efcf24173967d80b (patch) | |
tree | a312f443e9328fbe5d82369beb3b2e12c4f9e387 /OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs | |
parent | Try to fix Mantis#2727. SQLite seems to be able to store bigger numbers in (diff) | |
download | opensim-SC-d1841ca94d382215a40a7433efcf24173967d80b.zip opensim-SC-d1841ca94d382215a40a7433efcf24173967d80b.tar.gz opensim-SC-d1841ca94d382215a40a7433efcf24173967d80b.tar.bz2 opensim-SC-d1841ca94d382215a40a7433efcf24173967d80b.tar.xz |
Mantis #2584 (again)
Next step of diva's TP fixes and HG support
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs | 27 |
1 files changed, 17 insertions, 10 deletions
diff --git a/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs b/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs index 54d4298..2268b28 100644 --- a/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs +++ b/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs | |||
@@ -230,7 +230,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
230 | protected bool CloseConnection(UUID agentID) | 230 | protected bool CloseConnection(UUID agentID) |
231 | { | 231 | { |
232 | m_log.Debug("[INTERREGION]: Incoming Agent Close Request for agent: " + agentID); | 232 | m_log.Debug("[INTERREGION]: Incoming Agent Close Request for agent: " + agentID); |
233 | 233 | ||
234 | handlerCloseAgentConnection = OnCloseAgentConnection; | 234 | handlerCloseAgentConnection = OnCloseAgentConnection; |
235 | if (handlerCloseAgentConnection != null) | 235 | if (handlerCloseAgentConnection != null) |
236 | { | 236 | { |
@@ -727,24 +727,31 @@ namespace OpenSim.Region.Environment.Scenes | |||
727 | KiPrimitive(avatar.LocalId); | 727 | KiPrimitive(avatar.LocalId); |
728 | } | 728 | } |
729 | 729 | ||
730 | avatar.Close(); | ||
731 | 730 | ||
732 | uint newRegionX = (uint)(reg.RegionHandle >> 40); | 731 | uint newRegionX = (uint)(reg.RegionHandle >> 40); |
733 | uint newRegionY = (((uint)(reg.RegionHandle)) >> 8); | 732 | uint newRegionY = (((uint)(reg.RegionHandle)) >> 8); |
734 | uint oldRegionX = (uint)(m_regionInfo.RegionHandle >> 40); | 733 | uint oldRegionX = (uint)(m_regionInfo.RegionHandle >> 40); |
735 | uint oldRegionY = (((uint)(m_regionInfo.RegionHandle)) >> 8); | 734 | uint oldRegionY = (((uint)(m_regionInfo.RegionHandle)) >> 8); |
736 | if (Util.fast_distance2d((int)(newRegionX - oldRegionX), (int)(newRegionY - oldRegionY)) > 3) | 735 | |
736 | // Let's close some children agents | ||
737 | avatar.CloseChildAgents(newRegionX, newRegionY); | ||
738 | |||
739 | avatar.Close(); | ||
740 | |||
741 | // Finally, let's close this previously-known-as-root agent, when the jump is outside the view zone | ||
742 | |||
743 | // This is a little too fast of a distance computation... it's not consistent with the rule | ||
744 | // of having child agents in exactly the adjacent regions. Some topologies result in orphan | ||
745 | // children | ||
746 | //if (Util.fast_distance2d((int)(newRegionX - oldRegionX), (int)(newRegionY - oldRegionY)) > 3) | ||
747 | //if (((int)Math.Abs((int)(newRegionX - oldRegionX)) > 1) || ((int)Math.Abs((int)(newRegionY - oldRegionY)) > 1)) | ||
748 | if (Util.IsOutsideView(oldRegionX, newRegionX, oldRegionY, newRegionY)) | ||
737 | { | 749 | { |
738 | //SendCloseChildAgentConnections(avatar.UUID,avatar.GetKnownRegionList()); | 750 | //SendCloseChildAgentConnections(avatar.UUID,avatar.GetKnownRegionList()); |
739 | SendCloseChildAgentConnections(avatar.UUID, childRegions); | 751 | //SendCloseChildAgentConnections(avatar.UUID, childRegions); |
740 | if (eq != null) | ||
741 | { | ||
742 | OSD Item = EventQueueHelper.DisableSimulator(m_regionInfo.RegionHandle); | ||
743 | eq.Enqueue(Item, avatar.UUID); | ||
744 | } | ||
745 | Thread.Sleep(2000); | ||
746 | CloseConnection(avatar.UUID); | 752 | CloseConnection(avatar.UUID); |
747 | } | 753 | } |
754 | |||
748 | // if (teleport success) // seems to be always success here | 755 | // if (teleport success) // seems to be always success here |
749 | // the user may change their profile information in other region, | 756 | // the user may change their profile information in other region, |
750 | // so the userinfo in UserProfileCache is not reliable any more, delete it | 757 | // so the userinfo in UserProfileCache is not reliable any more, delete it |