diff options
author | Robert Adams | 2013-11-28 08:20:16 -0800 |
---|---|---|
committer | Robert Adams | 2013-11-28 08:20:16 -0800 |
commit | 7aa00632b90f9c24ff6b0fa0da385744a6573c32 (patch) | |
tree | bc63b12b893d3842932e4d0a3def8ed038288004 /OpenSim/Services/GridService/GridService.cs | |
parent | Merge branch 'master' into varregion (diff) | |
download | opensim-SC_OLD-7aa00632b90f9c24ff6b0fa0da385744a6573c32.zip opensim-SC_OLD-7aa00632b90f9c24ff6b0fa0da385744a6573c32.tar.gz opensim-SC_OLD-7aa00632b90f9c24ff6b0fa0da385744a6573c32.tar.bz2 opensim-SC_OLD-7aa00632b90f9c24ff6b0fa0da385744a6573c32.tar.xz |
varregion: many replacements of in-place arithmetic with calls to
the Util functions for converting world addresses to region addresses
and converting region handles to locations.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Services/GridService/GridService.cs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/OpenSim/Services/GridService/GridService.cs b/OpenSim/Services/GridService/GridService.cs index 9fa2dc5..aa7ffc1 100644 --- a/OpenSim/Services/GridService/GridService.cs +++ b/OpenSim/Services/GridService/GridService.cs | |||
@@ -347,6 +347,11 @@ namespace OpenSim.Services.GridService | |||
347 | return null; | 347 | return null; |
348 | } | 348 | } |
349 | 349 | ||
350 | // Get a region given its base coordinates. | ||
351 | // NOTE: this is NOT 'get a region by some point in the region'. The coordinate MUST | ||
352 | // be the base coordinate of the region. | ||
353 | // The snapping is technically unnecessary but is harmless because regions are always | ||
354 | // multiples of the legacy region size (256). | ||
350 | public GridRegion GetRegionByPosition(UUID scopeID, int x, int y) | 355 | public GridRegion GetRegionByPosition(UUID scopeID, int x, int y) |
351 | { | 356 | { |
352 | int snapX = (int)(x / Constants.RegionSize) * (int)Constants.RegionSize; | 357 | int snapX = (int)(x / Constants.RegionSize) * (int)Constants.RegionSize; |