aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services/GridService/HypergridLinker.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Services/GridService/HypergridLinker.cs')
-rw-r--r--OpenSim/Services/GridService/HypergridLinker.cs62
1 files changed, 0 insertions, 62 deletions
diff --git a/OpenSim/Services/GridService/HypergridLinker.cs b/OpenSim/Services/GridService/HypergridLinker.cs
index 67114ef..bd68056 100644
--- a/OpenSim/Services/GridService/HypergridLinker.cs
+++ b/OpenSim/Services/GridService/HypergridLinker.cs
@@ -63,7 +63,6 @@ namespace OpenSim.Services.GridService
63 protected GatekeeperServiceConnector m_GatekeeperConnector; 63 protected GatekeeperServiceConnector m_GatekeeperConnector;
64 64
65 protected UUID m_ScopeID = UUID.Zero; 65 protected UUID m_ScopeID = UUID.Zero;
66// protected bool m_Check4096 = true;
67 protected string m_MapTileDirectory = string.Empty; 66 protected string m_MapTileDirectory = string.Empty;
68 protected string m_ThisGatekeeper = string.Empty; 67 protected string m_ThisGatekeeper = string.Empty;
69 protected Uri m_ThisGatekeeperURI = null; 68 protected Uri m_ThisGatekeeperURI = null;
@@ -120,8 +119,6 @@ namespace OpenSim.Services.GridService
120 if (scope != string.Empty) 119 if (scope != string.Empty)
121 UUID.TryParse(scope, out m_ScopeID); 120 UUID.TryParse(scope, out m_ScopeID);
122 121
123// m_Check4096 = gridConfig.GetBoolean("Check4096", true);
124
125//// TODO OpenSim is crazy, this is called from Robust and OpenSim, Robust needs the ../caches bit, OpenSim somehow adds a path already. I can't tell why. So strip the path. 122//// TODO OpenSim is crazy, this is called from Robust and OpenSim, Robust needs the ../caches bit, OpenSim somehow adds a path already. I can't tell why. So strip the path.
126 m_MapTileDirectory = Path.Combine(Util.cacheDir(), Path.GetFileName(gridConfig.GetString("MapTileDirectory", "maptiles"))); 123 m_MapTileDirectory = Path.Combine(Util.cacheDir(), Path.GetFileName(gridConfig.GetString("MapTileDirectory", "maptiles")));
127 124
@@ -337,19 +334,6 @@ namespace OpenSim.Services.GridService
337 return true; 334 return true;
338 } 335 }
339 336
340 // We are now performing this check for each individual teleport in the EntityTransferModule instead. This
341 // allows us to give better feedback when teleports fail because of the distance reason (which can't be
342 // done here) and it also hypergrid teleports that are within range (possibly because the source grid
343 // itself has regions that are very far apart).
344// uint x, y;
345// if (m_Check4096 && !Check4096(handle, out x, out y))
346// {
347// //RemoveHyperlinkRegion(regInfo.RegionID);
348// reason = "Region is too far (" + x + ", " + y + ")";
349// m_log.Info("[HYPERGRID LINKER]: Unable to link, region is too far (" + x + ", " + y + ")");
350// //return false;
351// }
352
353 regInfo.RegionID = regionID; 337 regInfo.RegionID = regionID;
354 regInfo.RegionSizeX = sizeX; 338 regInfo.RegionSizeX = sizeX;
355 regInfo.RegionSizeY = sizeY; 339 regInfo.RegionSizeY = sizeY;
@@ -402,52 +386,6 @@ namespace OpenSim.Services.GridService
402 } 386 }
403 } 387 }
404 388
405// Not currently used
406// /// <summary>
407// /// Cope with this viewer limitation.
408// /// </summary>
409// /// <param name="regInfo"></param>
410// /// <returns></returns>
411// public bool Check4096(ulong realHandle, out uint x, out uint y)
412// {
413// uint ux = 0, uy = 0;
414// Utils.LongToUInts(realHandle, out ux, out uy);
415// x = Util.WorldToRegionLoc(ux);
416// y = Util.WorldToRegionLoc(uy);
417//
418// const uint limit = Util.RegionToWorldLoc(4096 - 1);
419// uint xmin = ux - limit;
420// uint xmax = ux + limit;
421// uint ymin = uy - limit;
422// uint ymax = uy + limit;
423// // World map boundary checks
424// if (xmin < 0 || xmin > ux)
425// xmin = 0;
426// if (xmax > int.MaxValue || xmax < ux)
427// xmax = int.MaxValue;
428// if (ymin < 0 || ymin > uy)
429// ymin = 0;
430// if (ymax > int.MaxValue || ymax < uy)
431// ymax = int.MaxValue;
432//
433// // Check for any regions that are within the possible teleport range to the linked region
434// List<GridRegion> regions = m_GridService.GetRegionRange(m_ScopeID, (int)xmin, (int)xmax, (int)ymin, (int)ymax);
435// if (regions.Count == 0)
436// {
437// return false;
438// }
439// else
440// {
441// // Check for regions which are not linked regions
442// List<GridRegion> hyperlinks = m_GridService.GetHyperlinks(m_ScopeID);
443// IEnumerable<GridRegion> availableRegions = regions.Except(hyperlinks);
444// if (availableRegions.Count() == 0)
445// return false;
446// }
447//
448// return true;
449// }
450
451 private void AddHyperlinkRegion(GridRegion regionInfo, ulong regionHandle) 389 private void AddHyperlinkRegion(GridRegion regionInfo, ulong regionHandle)
452 { 390 {
453 RegionData rdata = m_GridService.RegionInfo2RegionData(regionInfo); 391 RegionData rdata = m_GridService.RegionInfo2RegionData(regionInfo);