diff options
-rw-r--r-- | OpenSim/Services/GridService/HypergridLinker.cs | 23 | ||||
-rw-r--r-- | bin/Robust.HG.ini.example | 2 | ||||
-rw-r--r-- | bin/config-include/StandaloneCommon.ini.example | 3 |
3 files changed, 21 insertions, 7 deletions
diff --git a/OpenSim/Services/GridService/HypergridLinker.cs b/OpenSim/Services/GridService/HypergridLinker.cs index 017df41..b190f93 100644 --- a/OpenSim/Services/GridService/HypergridLinker.cs +++ b/OpenSim/Services/GridService/HypergridLinker.cs | |||
@@ -27,7 +27,6 @@ | |||
27 | 27 | ||
28 | using System; | 28 | using System; |
29 | using System.Collections.Generic; | 29 | using System.Collections.Generic; |
30 | using System.Linq; | ||
31 | using System.Net; | 30 | using System.Net; |
32 | using System.Reflection; | 31 | using System.Reflection; |
33 | using System.Xml; | 32 | using System.Xml; |
@@ -63,6 +62,7 @@ namespace OpenSim.Services.GridService | |||
63 | protected GatekeeperServiceConnector m_GatekeeperConnector; | 62 | protected GatekeeperServiceConnector m_GatekeeperConnector; |
64 | 63 | ||
65 | protected UUID m_ScopeID = UUID.Zero; | 64 | protected UUID m_ScopeID = UUID.Zero; |
65 | protected bool m_Check4096 = true; | ||
66 | 66 | ||
67 | // Hyperlink regions are hyperlinks on the map | 67 | // Hyperlink regions are hyperlinks on the map |
68 | public readonly Dictionary<UUID, GridRegion> m_HyperlinkRegions = new Dictionary<UUID, GridRegion>(); | 68 | public readonly Dictionary<UUID, GridRegion> m_HyperlinkRegions = new Dictionary<UUID, GridRegion>(); |
@@ -117,6 +117,8 @@ namespace OpenSim.Services.GridService | |||
117 | if (scope != string.Empty) | 117 | if (scope != string.Empty) |
118 | UUID.TryParse(scope, out m_ScopeID); | 118 | UUID.TryParse(scope, out m_ScopeID); |
119 | 119 | ||
120 | m_Check4096 = gridConfig.GetBoolean("Check4096", true); | ||
121 | |||
120 | m_GatekeeperConnector = new GatekeeperServiceConnector(m_AssetService); | 122 | m_GatekeeperConnector = new GatekeeperServiceConnector(m_AssetService); |
121 | 123 | ||
122 | m_log.DebugFormat("[HYPERGRID LINKER]: Loaded all services..."); | 124 | m_log.DebugFormat("[HYPERGRID LINKER]: Loaded all services..."); |
@@ -278,7 +280,7 @@ namespace OpenSim.Services.GridService | |||
278 | } | 280 | } |
279 | 281 | ||
280 | uint x, y; | 282 | uint x, y; |
281 | if (!Check4096(handle, out x, out y)) | 283 | if (m_Check4096 && !Check4096(handle, out x, out y)) |
282 | { | 284 | { |
283 | RemoveHyperlinkRegion(regInfo.RegionID); | 285 | RemoveHyperlinkRegion(regInfo.RegionID); |
284 | reason = "Region is too far (" + x + ", " + y + ")"; | 286 | reason = "Region is too far (" + x + ", " + y + ")"; |
@@ -363,11 +365,18 @@ namespace OpenSim.Services.GridService | |||
363 | { | 365 | { |
364 | // Check for regions which are not linked regions | 366 | // Check for regions which are not linked regions |
365 | List<GridRegion> hyperlinks = m_GridService.GetHyperlinks(m_ScopeID); | 367 | List<GridRegion> hyperlinks = m_GridService.GetHyperlinks(m_ScopeID); |
366 | IEnumerable<GridRegion> availableRegions = regions.Except(hyperlinks); | 368 | // would like to use .Except, but doesn't seem to exist |
367 | if (availableRegions.Count() == 0) | 369 | //IEnumerable<GridRegion> availableRegions = regions.Except(hyperlinks); |
368 | { | 370 | List<GridRegion> availableRegions = regions.FindAll(delegate(GridRegion region) |
369 | return false; | 371 | { |
370 | } | 372 | // Ewww! n^2 |
373 | if (hyperlinks.Find(delegate(GridRegion r) { return r.RegionID == region.RegionID; }) == null) // not hyperlink. good. | ||
374 | return true; | ||
375 | |||
376 | return false; | ||
377 | }); | ||
378 | if (availableRegions.Count == 0) | ||
379 | return false; | ||
371 | } | 380 | } |
372 | 381 | ||
373 | return true; | 382 | return true; |
diff --git a/bin/Robust.HG.ini.example b/bin/Robust.HG.ini.example index ebabe8d..4b9334e 100644 --- a/bin/Robust.HG.ini.example +++ b/bin/Robust.HG.ini.example | |||
@@ -54,6 +54,8 @@ ServiceConnectors = "8003/OpenSim.Server.Handlers.dll:AssetServiceConnector,8003 | |||
54 | LocalServiceModule = "OpenSim.Services.GridService.dll:GridService" | 54 | LocalServiceModule = "OpenSim.Services.GridService.dll:GridService" |
55 | Realm = "regions" | 55 | Realm = "regions" |
56 | ; AllowDuplicateNames = "True" | 56 | ; AllowDuplicateNames = "True" |
57 | ; Check4096 = "False" | ||
58 | |||
57 | ;; Next, we can specify properties of regions, including default and fallback regions | 59 | ;; Next, we can specify properties of regions, including default and fallback regions |
58 | ;; The syntax is: Region_<RegionName> = "<flags>" | 60 | ;; The syntax is: Region_<RegionName> = "<flags>" |
59 | ;; or: Region_<RegionID> = "<flags>" | 61 | ;; or: Region_<RegionID> = "<flags>" |
diff --git a/bin/config-include/StandaloneCommon.ini.example b/bin/config-include/StandaloneCommon.ini.example index 6299485..51b5df9 100644 --- a/bin/config-include/StandaloneCommon.ini.example +++ b/bin/config-include/StandaloneCommon.ini.example | |||
@@ -48,6 +48,9 @@ | |||
48 | ;;--- For MySql region storage (alternative) | 48 | ;;--- For MySql region storage (alternative) |
49 | ;StorageProvider = "OpenSim.Data.MySQL.dll:MySqlRegionData" | 49 | ;StorageProvider = "OpenSim.Data.MySQL.dll:MySqlRegionData" |
50 | 50 | ||
51 | ; If HG, do you want this check on the distance to be performed? | ||
52 | ; Check4096 = "False" | ||
53 | |||
51 | ;; Next, we can specify properties of regions, including default and fallback regions | 54 | ;; Next, we can specify properties of regions, including default and fallback regions |
52 | ;; The syntax is: Region_<RegioName> = "<flags>" | 55 | ;; The syntax is: Region_<RegioName> = "<flags>" |
53 | ;; where <flags> can be DefaultRegion, FallbackRegion, NoDirectLogin, Persistent, LockedOut | 56 | ;; where <flags> can be DefaultRegion, FallbackRegion, NoDirectLogin, Persistent, LockedOut |