From 239dcaffb79426dd08177e79d04e026fad651ada Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sat, 26 Sep 2015 14:14:05 +0100 Subject: coment out some debug, clean a bit --- .../Grid/LocalGridServiceConnector.cs | 15 +++------------ .../CoreModules/ServiceConnectorsOut/Grid/RegionCache.cs | 12 ------------ 2 files changed, 3 insertions(+), 24 deletions(-) (limited to 'OpenSim/Region') 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 uint regionX = Util.WorldToRegionLoc((uint)x); 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. // 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); if (region != null) { - m_log.DebugFormat("{0} GetRegionByPosition. Found region {1} in cache (of region {2}). Pos=<{3},{4}>", - LogHeader, region.RegionName, rcache.RegionName, - Util.WorldToRegionLoc((uint)region.RegionLocX), Util.WorldToRegionLoc((uint)region.RegionLocY)); + //m_log.DebugFormat("{0} GetRegionByPosition. Found region {1} in cache (of region {2}). Pos=<{3},{4}>", + // LogHeader, region.RegionName, rcache.RegionName, + // Util.WorldToRegionLoc((uint)region.RegionLocX), Util.WorldToRegionLoc((uint)region.RegionLocY)); break; } } 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 { return new List(m_neighbours.Values); } - 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 // not the best, but this will not hold that many regions GridRegion foundRegion = null; -- cgit v1.1