diff options
author | Melanie Thielker | 2010-08-08 17:51:43 +0200 |
---|---|---|
committer | Melanie | 2010-08-08 17:37:50 +0100 |
commit | 1f25b9e8dbf500d22df55fa2a8f7f9b7bf873aa3 (patch) | |
tree | f779307b0abfa3be35871ea86e06da9a9922cf68 /OpenSim/Data/MSSQL | |
parent | In my crusade against facelights, I am striking the killing blow. Add a (diff) | |
download | opensim-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/MSSQL')
-rw-r--r-- | OpenSim/Data/MSSQL/MSSQLRegionData.cs | 7 |
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) |