aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Services/Connectors/Land/LandServicesConnector.cs2
-rw-r--r--OpenSim/Services/Connectors/Neighbour/NeighbourServicesConnector.cs2
-rw-r--r--OpenSim/Services/GridService/GridService.cs5
3 files changed, 7 insertions, 2 deletions
diff --git a/OpenSim/Services/Connectors/Land/LandServicesConnector.cs b/OpenSim/Services/Connectors/Land/LandServicesConnector.cs
index 30a73a4..644331a 100644
--- a/OpenSim/Services/Connectors/Land/LandServicesConnector.cs
+++ b/OpenSim/Services/Connectors/Land/LandServicesConnector.cs
@@ -78,7 +78,7 @@ namespace OpenSim.Services.Connectors
78 try 78 try
79 { 79 {
80 uint xpos = 0, ypos = 0; 80 uint xpos = 0, ypos = 0;
81 Utils.LongToUInts(regionHandle, out xpos, out ypos); 81 Util.RegionHandleToWorldLoc(regionHandle, out xpos, out ypos);
82 GridRegion info = m_GridService.GetRegionByPosition(scopeID, (int)xpos, (int)ypos); 82 GridRegion info = m_GridService.GetRegionByPosition(scopeID, (int)xpos, (int)ypos);
83 if (info != null) // just to be sure 83 if (info != null) // just to be sure
84 { 84 {
diff --git a/OpenSim/Services/Connectors/Neighbour/NeighbourServicesConnector.cs b/OpenSim/Services/Connectors/Neighbour/NeighbourServicesConnector.cs
index 774fe2a..beead97 100644
--- a/OpenSim/Services/Connectors/Neighbour/NeighbourServicesConnector.cs
+++ b/OpenSim/Services/Connectors/Neighbour/NeighbourServicesConnector.cs
@@ -69,7 +69,7 @@ namespace OpenSim.Services.Connectors
69 public virtual GridRegion HelloNeighbour(ulong regionHandle, RegionInfo thisRegion) 69 public virtual GridRegion HelloNeighbour(ulong regionHandle, RegionInfo thisRegion)
70 { 70 {
71 uint x = 0, y = 0; 71 uint x = 0, y = 0;
72 Utils.LongToUInts(regionHandle, out x, out y); 72 Util.RegionHandleToWorldLoc(regionHandle, out x, out y);
73 GridRegion regInfo = m_GridService.GetRegionByPosition(thisRegion.ScopeID, (int)x, (int)y); 73 GridRegion regInfo = m_GridService.GetRegionByPosition(thisRegion.ScopeID, (int)x, (int)y);
74 if ((regInfo != null) && 74 if ((regInfo != null) &&
75 // Don't remote-call this instance; that's a startup hickup 75 // Don't remote-call this instance; that's a startup hickup
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;