diff options
author | Melanie Thielker | 2010-08-08 17:51:43 +0200 |
---|---|---|
committer | Melanie Thielker | 2010-08-08 17:51:43 +0200 |
commit | 1cde77293e993c3a7329ea8e1fa013c8d7b898e5 (patch) | |
tree | ba9a009f1ceafe93dd0808d9c316f52164704a1a /OpenSim/Data/MySQL | |
parent | Merge branch 'careminster-presence-refactor' of ssh://3dhosting.de/var/git/ca... (diff) | |
download | opensim-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 'OpenSim/Data/MySQL')
-rw-r--r-- | OpenSim/Data/MySQL/MySQLRegionData.cs | 6 |
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) |