diff options
Diffstat (limited to 'OpenSim/Services/GridService')
-rw-r--r-- | OpenSim/Services/GridService/GridService.cs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/OpenSim/Services/GridService/GridService.cs b/OpenSim/Services/GridService/GridService.cs index e72b7f9..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; |
@@ -441,6 +446,8 @@ namespace OpenSim.Services.GridService | |||
441 | RegionData rdata = new RegionData(); | 446 | RegionData rdata = new RegionData(); |
442 | rdata.posX = (int)rinfo.RegionLocX; | 447 | rdata.posX = (int)rinfo.RegionLocX; |
443 | rdata.posY = (int)rinfo.RegionLocY; | 448 | rdata.posY = (int)rinfo.RegionLocY; |
449 | rdata.sizeX = rinfo.RegionSizeX; | ||
450 | rdata.sizeY = rinfo.RegionSizeY; | ||
444 | rdata.RegionID = rinfo.RegionID; | 451 | rdata.RegionID = rinfo.RegionID; |
445 | rdata.RegionName = rinfo.RegionName; | 452 | rdata.RegionName = rinfo.RegionName; |
446 | rdata.Data = rinfo.ToKeyValuePairs(); | 453 | rdata.Data = rinfo.ToKeyValuePairs(); |
@@ -454,6 +461,8 @@ namespace OpenSim.Services.GridService | |||
454 | GridRegion rinfo = new GridRegion(rdata.Data); | 461 | GridRegion rinfo = new GridRegion(rdata.Data); |
455 | rinfo.RegionLocX = rdata.posX; | 462 | rinfo.RegionLocX = rdata.posX; |
456 | rinfo.RegionLocY = rdata.posY; | 463 | rinfo.RegionLocY = rdata.posY; |
464 | rinfo.RegionSizeX = rdata.sizeX; | ||
465 | rinfo.RegionSizeY = rdata.sizeY; | ||
457 | rinfo.RegionID = rdata.RegionID; | 466 | rinfo.RegionID = rdata.RegionID; |
458 | rinfo.RegionName = rdata.RegionName; | 467 | rinfo.RegionName = rdata.RegionName; |
459 | rinfo.ScopeID = rdata.ScopeID; | 468 | rinfo.ScopeID = rdata.ScopeID; |