aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/MSSQL/MSSQLRegionData.cs
diff options
context:
space:
mode:
authorMelanie Thielker2010-08-08 17:51:43 +0200
committerMelanie Thielker2010-08-08 17:51:43 +0200
commit1cde77293e993c3a7329ea8e1fa013c8d7b898e5 (patch)
treeba9a009f1ceafe93dd0808d9c316f52164704a1a /OpenSim/Data/MSSQL/MSSQLRegionData.cs
parentMerge branch 'careminster-presence-refactor' of ssh://3dhosting.de/var/git/ca... (diff)
downloadopensim-SC_OLD-1cde77293e993c3a7329ea8e1fa013c8d7b898e5.zip
opensim-SC_OLD-1cde77293e993c3a7329ea8e1fa013c8d7b898e5.tar.gz
opensim-SC_OLD-1cde77293e993c3a7329ea8e1fa013c8d7b898e5.tar.bz2
opensim-SC_OLD-1cde77293e993c3a7329ea8e1fa013c8d7b898e5.tar.xz
Thank you, Marck00, for a patch that implemented region distance sorting
for fallback regions. Applied with changes.
Diffstat (limited to '')
-rw-r--r--OpenSim/Data/MSSQL/MSSQLRegionData.cs7
1 files changed, 5 insertions, 2 deletions
diff --git a/OpenSim/Data/MSSQL/MSSQLRegionData.cs b/OpenSim/Data/MSSQL/MSSQLRegionData.cs
index 9656be1..cdf8ec0 100644
--- a/OpenSim/Data/MSSQL/MSSQLRegionData.cs
+++ b/OpenSim/Data/MSSQL/MSSQLRegionData.cs
@@ -315,8 +315,11 @@ namespace OpenSim.Data.MSSQL
315 315
316 public List<RegionData> GetFallbackRegions(UUID scopeID, int x, int y) 316 public List<RegionData> GetFallbackRegions(UUID scopeID, int x, int y)
317 { 317 {
318 // TODO: distance-sort results 318 List<RegionData> regions = Get((int)RegionFlags.FallbackRegion, scopeID);
319 return Get((int)RegionFlags.FallbackRegion, scopeID); 319 RegionDataDistanceCompare distanceComparer = new RegionDataDistanceCompare(x, y);
320 regions.Sort(distanceComparer);
321
322 return regions;
320 } 323 }
321 324
322 public List<RegionData> GetHyperlinks(UUID scopeID) 325 public List<RegionData> GetHyperlinks(UUID scopeID)