aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/LocalGridServiceConnector.cs15
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/RegionCache.cs12
-rw-r--r--OpenSim/Services/GridService/GridService.cs8
3 files changed, 3 insertions, 32 deletions
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/LocalGridServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/LocalGridServiceConnector.cs
index 6752e31..e585c25 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/LocalGridServiceConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/LocalGridServiceConnector.cs
@@ -201,15 +201,6 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
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 203
204 /* we are insane now
205 // Sanity check
206 if ((Util.RegionToWorldLoc(regionX) != (uint)x) || (Util.RegionToWorldLoc(regionY) != (uint)y))
207 {
208 m_log.WarnFormat("{0} GetRegionByPosition. Bad position requested: not the base of the region. Requested Pos=<{1},{2}>, Should Be=<{3},{4}>",
209 LogHeader, x, y, Util.RegionToWorldLoc(regionX), Util.RegionToWorldLoc(regionY));
210 }
211 */
212
213 // First see if it's a neighbour, even if it isn't on this sim. 204 // First see if it's a neighbour, even if it isn't on this sim.
214 // Neighbour data is cached in memory, so this is fast 205 // Neighbour data is cached in memory, so this is fast
215 206
@@ -220,9 +211,9 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
220 region = rcache.GetRegionByPosition(x, y); 211 region = rcache.GetRegionByPosition(x, y);
221 if (region != null) 212 if (region != null)
222 { 213 {
223 m_log.DebugFormat("{0} GetRegionByPosition. Found region {1} in cache (of region {2}). Pos=<{3},{4}>", 214 //m_log.DebugFormat("{0} GetRegionByPosition. Found region {1} in cache (of region {2}). Pos=<{3},{4}>",
224 LogHeader, region.RegionName, rcache.RegionName, 215 // LogHeader, region.RegionName, rcache.RegionName,
225 Util.WorldToRegionLoc((uint)region.RegionLocX), Util.WorldToRegionLoc((uint)region.RegionLocY)); 216 // Util.WorldToRegionLoc((uint)region.RegionLocX), Util.WorldToRegionLoc((uint)region.RegionLocY));
226 break; 217 break;
227 } 218 }
228 } 219 }
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/RegionCache.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/RegionCache.cs
index 7ae4771..2961c10 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/RegionCache.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/RegionCache.cs
@@ -81,21 +81,9 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
81 { 81 {
82 return new List<GridRegion>(m_neighbours.Values); 82 return new List<GridRegion>(m_neighbours.Values);
83 } 83 }
84
85 84
86 public GridRegion GetRegionByPosition(int x, int y) 85 public GridRegion GetRegionByPosition(int x, int y)
87 { 86 {
88 /*
89 uint xsnap = (uint)(x / Constants.RegionSize) * Constants.RegionSize;
90 uint ysnap = (uint)(y / Constants.RegionSize) * Constants.RegionSize;
91 ulong handle = Util.RegionWorldLocToHandle(xsnap, ysnap);
92
93 if (m_neighbours.ContainsKey(handle))
94 return m_neighbours[handle];
95
96 return null;
97 */
98
99 // do actual search by position 87 // do actual search by position
100 // not the best, but this will not hold that many regions 88 // not the best, but this will not hold that many regions
101 GridRegion foundRegion = null; 89 GridRegion foundRegion = null;
diff --git a/OpenSim/Services/GridService/GridService.cs b/OpenSim/Services/GridService/GridService.cs
index 8059275..53805d0 100644
--- a/OpenSim/Services/GridService/GridService.cs
+++ b/OpenSim/Services/GridService/GridService.cs
@@ -487,14 +487,6 @@ namespace OpenSim.Services.GridService
487 487
488 if (region != null) 488 if (region != null)
489 { 489 {
490 // Not really? Maybe?
491
492/* this fails wiht var regions. My_sql db should now handle var regions
493 List<RegionData> rdatas = m_Database.Get(
494 region.posX - region.sizeX - 1, region.posY - region.sizeY - 1,
495 region.posX + region.sizeX + 1, region.posY + region.sizeY + 1, scopeID);
496*/
497 // so send normal search area
498 List<RegionData> rdatas = m_Database.Get( 490 List<RegionData> rdatas = m_Database.Get(
499 region.posX - 1, region.posY - 1, 491 region.posX - 1, region.posY - 1,
500 region.posX + region.sizeX + 1, region.posY + region.sizeY + 1, scopeID); 492 region.posX + region.sizeX + 1, region.posY + region.sizeY + 1, scopeID);