Added Check4096 config var under [GridService], at the request of many. Changed the iteration that Marck had on the Hyperlinker.
ATTENTION! CONFIGURATION CHANGE AFFECTING Robust.HG.ini.example and StandaloneCommon.ini.example.0.7.0.1-release
parent
a0fa6dc967
commit
d44b7d9637
|
@ -27,7 +27,6 @@
|
|||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Reflection;
|
||||
using System.Xml;
|
||||
|
@ -63,6 +62,7 @@ namespace OpenSim.Services.GridService
|
|||
protected GatekeeperServiceConnector m_GatekeeperConnector;
|
||||
|
||||
protected UUID m_ScopeID = UUID.Zero;
|
||||
protected bool m_Check4096 = true;
|
||||
|
||||
// Hyperlink regions are hyperlinks on the map
|
||||
public readonly Dictionary<UUID, GridRegion> m_HyperlinkRegions = new Dictionary<UUID, GridRegion>();
|
||||
|
@ -117,6 +117,8 @@ namespace OpenSim.Services.GridService
|
|||
if (scope != string.Empty)
|
||||
UUID.TryParse(scope, out m_ScopeID);
|
||||
|
||||
m_Check4096 = gridConfig.GetBoolean("Check4096", true);
|
||||
|
||||
m_GatekeeperConnector = new GatekeeperServiceConnector(m_AssetService);
|
||||
|
||||
m_log.DebugFormat("[HYPERGRID LINKER]: Loaded all services...");
|
||||
|
@ -278,7 +280,7 @@ namespace OpenSim.Services.GridService
|
|||
}
|
||||
|
||||
uint x, y;
|
||||
if (!Check4096(handle, out x, out y))
|
||||
if (m_Check4096 && !Check4096(handle, out x, out y))
|
||||
{
|
||||
RemoveHyperlinkRegion(regInfo.RegionID);
|
||||
reason = "Region is too far (" + x + ", " + y + ")";
|
||||
|
@ -363,11 +365,18 @@ namespace OpenSim.Services.GridService
|
|||
{
|
||||
// Check for regions which are not linked regions
|
||||
List<GridRegion> hyperlinks = m_GridService.GetHyperlinks(m_ScopeID);
|
||||
IEnumerable<GridRegion> availableRegions = regions.Except(hyperlinks);
|
||||
if (availableRegions.Count() == 0)
|
||||
// would like to use .Except, but doesn't seem to exist
|
||||
//IEnumerable<GridRegion> availableRegions = regions.Except(hyperlinks);
|
||||
List<GridRegion> availableRegions = regions.FindAll(delegate(GridRegion region)
|
||||
{
|
||||
// Ewww! n^2
|
||||
if (hyperlinks.Find(delegate(GridRegion r) { return r.RegionID == region.RegionID; }) == null) // not hyperlink. good.
|
||||
return true;
|
||||
|
||||
return false;
|
||||
});
|
||||
if (availableRegions.Count == 0)
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
|
@ -54,6 +54,8 @@ ServiceConnectors = "8003/OpenSim.Server.Handlers.dll:AssetServiceConnector,8003
|
|||
LocalServiceModule = "OpenSim.Services.GridService.dll:GridService"
|
||||
Realm = "regions"
|
||||
; AllowDuplicateNames = "True"
|
||||
; Check4096 = "False"
|
||||
|
||||
;; Next, we can specify properties of regions, including default and fallback regions
|
||||
;; The syntax is: Region_<RegionName> = "<flags>"
|
||||
;; or: Region_<RegionID> = "<flags>"
|
||||
|
|
|
@ -48,6 +48,9 @@
|
|||
;;--- For MySql region storage (alternative)
|
||||
;StorageProvider = "OpenSim.Data.MySQL.dll:MySqlRegionData"
|
||||
|
||||
; If HG, do you want this check on the distance to be performed?
|
||||
; Check4096 = "False"
|
||||
|
||||
;; Next, we can specify properties of regions, including default and fallback regions
|
||||
;; The syntax is: Region_<RegioName> = "<flags>"
|
||||
;; where <flags> can be DefaultRegion, FallbackRegion, NoDirectLogin, Persistent, LockedOut
|
||||
|
|
Loading…
Reference in New Issue