diff options
Diffstat (limited to 'OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs')
-rw-r--r-- | OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs index 816591b..6b59f94 100644 --- a/OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs +++ b/OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs | |||
@@ -101,7 +101,7 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
101 | public string RegisterRegion(UUID scopeID, GridRegion regionInfo) | 101 | public string RegisterRegion(UUID scopeID, GridRegion regionInfo) |
102 | { | 102 | { |
103 | Vector3d minPosition = new Vector3d(regionInfo.RegionLocX, regionInfo.RegionLocY, 0.0); | 103 | Vector3d minPosition = new Vector3d(regionInfo.RegionLocX, regionInfo.RegionLocY, 0.0); |
104 | Vector3d maxPosition = minPosition + new Vector3d(Constants.RegionSize, Constants.RegionSize, Constants.RegionHeight); | 104 | Vector3d maxPosition = minPosition + new Vector3d(regionInfo.RegionSizeX, regionInfo.RegionSizeY, Constants.RegionHeight); |
105 | 105 | ||
106 | OSDMap extraData = new OSDMap | 106 | OSDMap extraData = new OSDMap |
107 | { | 107 | { |
@@ -156,15 +156,15 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
156 | 156 | ||
157 | public List<GridRegion> GetNeighbours(UUID scopeID, UUID regionID) | 157 | public List<GridRegion> GetNeighbours(UUID scopeID, UUID regionID) |
158 | { | 158 | { |
159 | const int NEIGHBOR_RADIUS = 128; | ||
160 | |||
161 | GridRegion region = GetRegionByUUID(scopeID, regionID); | 159 | GridRegion region = GetRegionByUUID(scopeID, regionID); |
162 | 160 | ||
161 | int NEIGHBOR_RADIUS = Math.Max(region.RegionSizeX, region.RegionSizeY) / 2; | ||
162 | |||
163 | if (region != null) | 163 | if (region != null) |
164 | { | 164 | { |
165 | List<GridRegion> regions = GetRegionRange(scopeID, | 165 | List<GridRegion> regions = GetRegionRange(scopeID, |
166 | region.RegionLocX - NEIGHBOR_RADIUS, region.RegionLocX + (int)Constants.RegionSize + NEIGHBOR_RADIUS, | 166 | region.RegionLocX - NEIGHBOR_RADIUS, region.RegionLocX + region.RegionSizeX + NEIGHBOR_RADIUS, |
167 | region.RegionLocY - NEIGHBOR_RADIUS, region.RegionLocY + (int)Constants.RegionSize + NEIGHBOR_RADIUS); | 167 | region.RegionLocY - NEIGHBOR_RADIUS, region.RegionLocY + region.RegionSizeY + NEIGHBOR_RADIUS); |
168 | 168 | ||
169 | for (int i = 0; i < regions.Count; i++) | 169 | for (int i = 0; i < regions.Count; i++) |
170 | { | 170 | { |
@@ -229,7 +229,7 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
229 | else | 229 | else |
230 | { | 230 | { |
231 | // m_log.InfoFormat("[SIMIAN GRID CONNECTOR]: Grid service did not find a match for region at {0},{1}", | 231 | // m_log.InfoFormat("[SIMIAN GRID CONNECTOR]: Grid service did not find a match for region at {0},{1}", |
232 | // x / Constants.RegionSize, y / Constants.RegionSize); | 232 | // Util.WorldToRegionLoc(x), Util.WorldToRegionLoc(y)); |
233 | return null; | 233 | return null; |
234 | } | 234 | } |
235 | } | 235 | } |
@@ -443,9 +443,13 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
443 | region.RegionName = response["Name"].AsString(); | 443 | region.RegionName = response["Name"].AsString(); |
444 | 444 | ||
445 | Vector3d minPosition = response["MinPosition"].AsVector3d(); | 445 | Vector3d minPosition = response["MinPosition"].AsVector3d(); |
446 | Vector3d maxPosition = response["MaxPosition"].AsVector3d(); | ||
446 | region.RegionLocX = (int)minPosition.X; | 447 | region.RegionLocX = (int)minPosition.X; |
447 | region.RegionLocY = (int)minPosition.Y; | 448 | region.RegionLocY = (int)minPosition.Y; |
448 | 449 | ||
450 | region.RegionSizeX = (int)maxPosition.X - (int)minPosition.X; | ||
451 | region.RegionSizeY = (int)maxPosition.Y - (int)minPosition.Y; | ||
452 | |||
449 | if ( ! extraData["HyperGrid"] ) { | 453 | if ( ! extraData["HyperGrid"] ) { |
450 | Uri httpAddress = response["Address"].AsUri(); | 454 | Uri httpAddress = response["Address"].AsUri(); |
451 | region.ExternalHostName = httpAddress.Host; | 455 | region.ExternalHostName = httpAddress.Host; |