aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/LocalGridServiceConnector.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/LocalGridServiceConnector.cs')
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/LocalGridServiceConnector.cs27
1 files changed, 18 insertions, 9 deletions
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/LocalGridServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/LocalGridServiceConnector.cs
index 4661c21..664aba9 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/LocalGridServiceConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/LocalGridServiceConnector.cs
@@ -198,8 +198,15 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
198 public GridRegion GetRegionByPosition(UUID scopeID, int x, int y) 198 public GridRegion GetRegionByPosition(UUID scopeID, int x, int y)
199 { 199 {
200 GridRegion region = null; 200 GridRegion region = null;
201// uint regionX = Util.WorldToRegionLoc((uint)x); 201 uint regionX = Util.WorldToRegionLoc((uint)x);
202// uint regionY = Util.WorldToRegionLoc((uint)y); 202 uint regionY = Util.WorldToRegionLoc((uint)y);
203
204 // Sanity check
205 if ((Util.RegionToWorldLoc(regionX) != (uint)x) || (Util.RegionToWorldLoc(regionY) != (uint)y))
206 {
207 m_log.WarnFormat("{0} GetRegionByPosition. Bad position requested: not the base of the region. Requested Pos=<{1},{2}>, Should Be=<{3},{4}>",
208 LogHeader, x, y, Util.RegionToWorldLoc(regionX), Util.RegionToWorldLoc(regionY));
209 }
203 210
204 // First see if it's a neighbour, even if it isn't on this sim. 211 // First see if it's a neighbour, even if it isn't on this sim.
205 // Neighbour data is cached in memory, so this is fast 212 // Neighbour data is cached in memory, so this is fast
@@ -211,8 +218,9 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
211 region = rcache.GetRegionByPosition(x, y); 218 region = rcache.GetRegionByPosition(x, y);
212 if (region != null) 219 if (region != null)
213 { 220 {
214 // m_log.DebugFormat("{0} GetRegionByPosition. Found region {1} in cache. Pos=<{2},{3}>", 221 m_log.DebugFormat("{0} GetRegionByPosition. Found region {1} in cache (of region {2}). Pos=<{3},{4}>",
215 // LogHeader, region.RegionName, x, y); 222 LogHeader, region.RegionName,
223 Util.WorldToRegionLoc((uint)region.RegionLocX), Util.WorldToRegionLoc((uint)region.RegionLocY));
216 break; 224 break;
217 } 225 }
218 } 226 }
@@ -222,19 +230,20 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
222 if (region == null) 230 if (region == null)
223 { 231 {
224 region = m_GridService.GetRegionByPosition(scopeID, x, y); 232 region = m_GridService.GetRegionByPosition(scopeID, x, y);
225 /* 233
226 if (region == null) 234 if (region == null)
227 { 235 {
228 m_log.DebugFormat("{0} GetRegionByPosition. Region not found by grid service. Pos=<{1},{2}>", 236 m_log.DebugFormat("{0} GetRegionByPosition. Region not found by grid service. Pos=<{1},{2}>",
229 LogHeader, regionX, regionY); 237 LogHeader, regionX, regionY);
230 } 238 }
231 else 239 else
232 { 240 {
233 m_log.DebugFormat("{0} GetRegionByPosition. Requested region {1} from grid service. Pos=<{2},{3}>", 241 m_log.DebugFormat("{0} GetRegionByPosition. Got region {1} from grid service. Pos=<{2},{3}>",
234 LogHeader, region.RegionName, regionX, regionY); 242 LogHeader, region.RegionName,
243 Util.WorldToRegionLoc((uint)region.RegionLocX), Util.WorldToRegionLoc((uint)region.RegionLocY));
235 } 244 }
236 */
237 } 245 }
246
238 return region; 247 return region;
239 } 248 }
240 249