aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services/GridService
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Services/GridService')
-rw-r--r--OpenSim/Services/GridService/GridService.cs32
-rw-r--r--OpenSim/Services/GridService/HypergridLinker.cs2
2 files changed, 31 insertions, 3 deletions
diff --git a/OpenSim/Services/GridService/GridService.cs b/OpenSim/Services/GridService/GridService.cs
index a1485c8..e72b7f9 100644
--- a/OpenSim/Services/GridService/GridService.cs
+++ b/OpenSim/Services/GridService/GridService.cs
@@ -265,8 +265,9 @@ namespace OpenSim.Services.GridService
265 m_log.DebugFormat("[GRID SERVICE]: Database exception: {0}", e); 265 m_log.DebugFormat("[GRID SERVICE]: Database exception: {0}", e);
266 } 266 }
267 267
268 m_log.DebugFormat("[GRID SERVICE]: Region {0} ({1}) registered successfully at {2}-{3}", 268 m_log.DebugFormat("[GRID SERVICE]: Region {0} ({1}) registered successfully at {2}-{3} with flags {4}",
269 regionInfos.RegionName, regionInfos.RegionID, regionInfos.RegionCoordX, regionInfos.RegionCoordY); 269 regionInfos.RegionName, regionInfos.RegionID, regionInfos.RegionCoordX, regionInfos.RegionCoordY,
270 (OpenSim.Framework.RegionFlags)flags);
270 271
271 return String.Empty; 272 return String.Empty;
272 } 273 }
@@ -478,6 +479,33 @@ namespace OpenSim.Services.GridService
478 return ret; 479 return ret;
479 } 480 }
480 481
482 public List<GridRegion> GetDefaultHypergridRegions(UUID scopeID)
483 {
484 List<GridRegion> ret = new List<GridRegion>();
485
486 List<RegionData> regions = m_Database.GetDefaultHypergridRegions(scopeID);
487
488 foreach (RegionData r in regions)
489 {
490 if ((Convert.ToInt32(r.Data["flags"]) & (int)OpenSim.Framework.RegionFlags.RegionOnline) != 0)
491 ret.Add(RegionData2RegionInfo(r));
492 }
493
494 int hgDefaultRegionsFoundOnline = regions.Count;
495
496 // For now, hypergrid default regions will always be given precedence but we will also return simple default
497 // regions in case no specific hypergrid regions are specified.
498 ret.AddRange(GetDefaultRegions(scopeID));
499
500 int normalDefaultRegionsFoundOnline = ret.Count - hgDefaultRegionsFoundOnline;
501
502 m_log.DebugFormat(
503 "[GRID SERVICE]: GetDefaultHypergridRegions returning {0} hypergrid default and {1} normal default regions",
504 hgDefaultRegionsFoundOnline, normalDefaultRegionsFoundOnline);
505
506 return ret;
507 }
508
481 public List<GridRegion> GetFallbackRegions(UUID scopeID, int x, int y) 509 public List<GridRegion> GetFallbackRegions(UUID scopeID, int x, int y)
482 { 510 {
483 List<GridRegion> ret = new List<GridRegion>(); 511 List<GridRegion> ret = new List<GridRegion>();
diff --git a/OpenSim/Services/GridService/HypergridLinker.cs b/OpenSim/Services/GridService/HypergridLinker.cs
index 8335724..4024295 100644
--- a/OpenSim/Services/GridService/HypergridLinker.cs
+++ b/OpenSim/Services/GridService/HypergridLinker.cs
@@ -79,7 +79,7 @@ namespace OpenSim.Services.GridService
79 { 79 {
80 if (m_DefaultRegion == null) 80 if (m_DefaultRegion == null)
81 { 81 {
82 List<GridRegion> defs = m_GridService.GetDefaultRegions(m_ScopeID); 82 List<GridRegion> defs = m_GridService.GetDefaultHypergridRegions(m_ScopeID);
83 if (defs != null && defs.Count > 0) 83 if (defs != null && defs.Count > 0)
84 m_DefaultRegion = defs[0]; 84 m_DefaultRegion = defs[0];
85 else 85 else