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/Hypergrid | |
parent | Try to fix Mantis#2727. SQLite seems to be able to store bigger numbers in (diff) | |
download | opensim-SC_OLD-d1841ca94d382215a40a7433efcf24173967d80b.zip opensim-SC_OLD-d1841ca94d382215a40a7433efcf24173967d80b.tar.gz opensim-SC_OLD-d1841ca94d382215a40a7433efcf24173967d80b.tar.bz2 opensim-SC_OLD-d1841ca94d382215a40a7433efcf24173967d80b.tar.xz |
Mantis #2584 (again)
Next step of diva's TP fixes and HG support
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/Hypergrid')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/Hypergrid/HGSceneCommunicationService.cs | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Hypergrid/HGSceneCommunicationService.cs b/OpenSim/Region/Environment/Scenes/Hypergrid/HGSceneCommunicationService.cs index 5d34773..b6fd798 100644 --- a/OpenSim/Region/Environment/Scenes/Hypergrid/HGSceneCommunicationService.cs +++ b/OpenSim/Region/Environment/Scenes/Hypergrid/HGSceneCommunicationService.cs | |||
@@ -222,25 +222,28 @@ namespace OpenSim.Region.Environment.Scenes.Hypergrid | |||
222 | KiPrimitive(avatar.LocalId); | 222 | KiPrimitive(avatar.LocalId); |
223 | } | 223 | } |
224 | 224 | ||
225 | avatar.Close(); | ||
226 | 225 | ||
227 | uint newRegionX = (uint)(reg.RegionHandle >> 40); | 226 | uint newRegionX = (uint)(reg.RegionHandle >> 40); |
228 | uint newRegionY = (((uint)(reg.RegionHandle)) >> 8); | 227 | uint newRegionY = (((uint)(reg.RegionHandle)) >> 8); |
229 | uint oldRegionX = (uint)(m_regionInfo.RegionHandle >> 40); | 228 | uint oldRegionX = (uint)(m_regionInfo.RegionHandle >> 40); |
230 | uint oldRegionY = (((uint)(m_regionInfo.RegionHandle)) >> 8); | 229 | uint oldRegionY = (((uint)(m_regionInfo.RegionHandle)) >> 8); |
230 | |||
231 | // Let's close some children agents | ||
232 | if (isHyperLink) // close them all | ||
233 | SendCloseChildAgentConnections(avatar.UUID, avatar.GetKnownRegionList()); | ||
234 | else // close just a few | ||
235 | avatar.CloseChildAgents(newRegionX, newRegionY); | ||
236 | |||
237 | avatar.Close(); | ||
238 | |||
239 | // Finally, let's close this previously-known-as-root agent, when the jump is outside the view zone | ||
231 | /// | 240 | /// |
232 | /// Hypergrid mod: extra check for isHyperLink | 241 | /// Hypergrid mod: extra check for isHyperLink |
233 | /// | 242 | /// |
234 | if ((Util.fast_distance2d((int)(newRegionX - oldRegionX), (int)(newRegionY - oldRegionY)) > 3) || isHyperLink) | 243 | //if ((Util.fast_distance2d((int)(newRegionX - oldRegionX), (int)(newRegionY - oldRegionY)) > 1) || isHyperLink) |
244 | //if (((int)Math.Abs((int)(newRegionX - oldRegionX)) > 1) || ((int)Math.Abs((int)(newRegionY - oldRegionY)) > 1) || isHyperLink) | ||
245 | if (Util.IsOutsideView(oldRegionX, newRegionX, oldRegionY, newRegionY)) | ||
235 | { | 246 | { |
236 | //SendCloseChildAgentConnections(avatar.UUID, avatar.GetKnownRegionList()); | ||
237 | SendCloseChildAgentConnections(avatar.UUID, childRegions); | ||
238 | if (eq != null) | ||
239 | { | ||
240 | OSD Item = EventQueueHelper.DisableSimulator(m_regionInfo.RegionHandle); | ||
241 | eq.Enqueue(Item, avatar.UUID); | ||
242 | } | ||
243 | Thread.Sleep(2000); | ||
244 | CloseConnection(avatar.UUID); | 247 | CloseConnection(avatar.UUID); |
245 | } | 248 | } |
246 | // if (teleport success) // seems to be always success here | 249 | // if (teleport success) // seems to be always success here |