coment out some debug, clean a bit
parent
05db03e809
commit
239dcaffb7
|
@ -201,15 +201,6 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
|
||||||
uint regionX = Util.WorldToRegionLoc((uint)x);
|
uint regionX = Util.WorldToRegionLoc((uint)x);
|
||||||
uint regionY = Util.WorldToRegionLoc((uint)y);
|
uint regionY = Util.WorldToRegionLoc((uint)y);
|
||||||
|
|
||||||
/* we are insane now
|
|
||||||
// Sanity check
|
|
||||||
if ((Util.RegionToWorldLoc(regionX) != (uint)x) || (Util.RegionToWorldLoc(regionY) != (uint)y))
|
|
||||||
{
|
|
||||||
m_log.WarnFormat("{0} GetRegionByPosition. Bad position requested: not the base of the region. Requested Pos=<{1},{2}>, Should Be=<{3},{4}>",
|
|
||||||
LogHeader, x, y, Util.RegionToWorldLoc(regionX), Util.RegionToWorldLoc(regionY));
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
// First see if it's a neighbour, even if it isn't on this sim.
|
// First see if it's a neighbour, even if it isn't on this sim.
|
||||||
// Neighbour data is cached in memory, so this is fast
|
// Neighbour data is cached in memory, so this is fast
|
||||||
|
|
||||||
|
@ -220,9 +211,9 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
|
||||||
region = rcache.GetRegionByPosition(x, y);
|
region = rcache.GetRegionByPosition(x, y);
|
||||||
if (region != null)
|
if (region != null)
|
||||||
{
|
{
|
||||||
m_log.DebugFormat("{0} GetRegionByPosition. Found region {1} in cache (of region {2}). Pos=<{3},{4}>",
|
//m_log.DebugFormat("{0} GetRegionByPosition. Found region {1} in cache (of region {2}). Pos=<{3},{4}>",
|
||||||
LogHeader, region.RegionName, rcache.RegionName,
|
// LogHeader, region.RegionName, rcache.RegionName,
|
||||||
Util.WorldToRegionLoc((uint)region.RegionLocX), Util.WorldToRegionLoc((uint)region.RegionLocY));
|
// Util.WorldToRegionLoc((uint)region.RegionLocX), Util.WorldToRegionLoc((uint)region.RegionLocY));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -81,21 +81,9 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
|
||||||
{
|
{
|
||||||
return new List<GridRegion>(m_neighbours.Values);
|
return new List<GridRegion>(m_neighbours.Values);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public GridRegion GetRegionByPosition(int x, int y)
|
public GridRegion GetRegionByPosition(int x, int y)
|
||||||
{
|
{
|
||||||
/*
|
|
||||||
uint xsnap = (uint)(x / Constants.RegionSize) * Constants.RegionSize;
|
|
||||||
uint ysnap = (uint)(y / Constants.RegionSize) * Constants.RegionSize;
|
|
||||||
ulong handle = Util.RegionWorldLocToHandle(xsnap, ysnap);
|
|
||||||
|
|
||||||
if (m_neighbours.ContainsKey(handle))
|
|
||||||
return m_neighbours[handle];
|
|
||||||
|
|
||||||
return null;
|
|
||||||
*/
|
|
||||||
|
|
||||||
// do actual search by position
|
// do actual search by position
|
||||||
// not the best, but this will not hold that many regions
|
// not the best, but this will not hold that many regions
|
||||||
GridRegion foundRegion = null;
|
GridRegion foundRegion = null;
|
||||||
|
|
|
@ -487,14 +487,6 @@ namespace OpenSim.Services.GridService
|
||||||
|
|
||||||
if (region != null)
|
if (region != null)
|
||||||
{
|
{
|
||||||
// Not really? Maybe?
|
|
||||||
|
|
||||||
/* this fails wiht var regions. My_sql db should now handle var regions
|
|
||||||
List<RegionData> rdatas = m_Database.Get(
|
|
||||||
region.posX - region.sizeX - 1, region.posY - region.sizeY - 1,
|
|
||||||
region.posX + region.sizeX + 1, region.posY + region.sizeY + 1, scopeID);
|
|
||||||
*/
|
|
||||||
// so send normal search area
|
|
||||||
List<RegionData> rdatas = m_Database.Get(
|
List<RegionData> rdatas = m_Database.Get(
|
||||||
region.posX - 1, region.posY - 1,
|
region.posX - 1, region.posY - 1,
|
||||||
region.posX + region.sizeX + 1, region.posY + region.sizeY + 1, scopeID);
|
region.posX + region.sizeX + 1, region.posY + region.sizeY + 1, scopeID);
|
||||||
|
|
Loading…
Reference in New Issue