aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/MySQL
diff options
context:
space:
mode:
authorMelanie Thielker2010-08-08 17:51:43 +0200
committerMelanie2010-08-08 17:37:50 +0100
commit1f25b9e8dbf500d22df55fa2a8f7f9b7bf873aa3 (patch)
treef779307b0abfa3be35871ea86e06da9a9922cf68 /OpenSim/Data/MySQL
parentIn my crusade against facelights, I am striking the killing blow. Add a (diff)
downloadopensim-SC_OLD-1f25b9e8dbf500d22df55fa2a8f7f9b7bf873aa3.zip
opensim-SC_OLD-1f25b9e8dbf500d22df55fa2a8f7f9b7bf873aa3.tar.gz
opensim-SC_OLD-1f25b9e8dbf500d22df55fa2a8f7f9b7bf873aa3.tar.bz2
opensim-SC_OLD-1f25b9e8dbf500d22df55fa2a8f7f9b7bf873aa3.tar.xz
Thank you, Marck00, for a patch that implemented region distance sorting
for fallback regions. Applied with changes.
Diffstat (limited to 'OpenSim/Data/MySQL')
-rw-r--r--OpenSim/Data/MySQL/MySQLRegionData.cs6
1 files changed, 4 insertions, 2 deletions
diff --git a/OpenSim/Data/MySQL/MySQLRegionData.cs b/OpenSim/Data/MySQL/MySQLRegionData.cs
index aec37e2..878b8e8 100644
--- a/OpenSim/Data/MySQL/MySQLRegionData.cs
+++ b/OpenSim/Data/MySQL/MySQLRegionData.cs
@@ -289,8 +289,10 @@ namespace OpenSim.Data.MySQL
289 289
290 public List<RegionData> GetFallbackRegions(UUID scopeID, int x, int y) 290 public List<RegionData> GetFallbackRegions(UUID scopeID, int x, int y)
291 { 291 {
292 // TODO: distance-sort results 292 List<RegionData> regions = Get((int)RegionFlags.FallbackRegion, scopeID);
293 return Get((int)RegionFlags.FallbackRegion, scopeID); 293 RegionDataDistanceCompare distanceComparer = new RegionDataDistanceCompare(x, y);
294 regions.Sort(distanceComparer);
295 return regions;
294 } 296 }
295 297
296 public List<RegionData> GetHyperlinks(UUID scopeID) 298 public List<RegionData> GetHyperlinks(UUID scopeID)