Modifications to debugging printouts. No functional changes.
parent
22dade6463
commit
0300ec45eb
|
@ -199,6 +199,8 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
|
|||
public GridRegion GetRegionByPosition(UUID scopeID, int x, int y)
|
||||
{
|
||||
GridRegion region = null;
|
||||
uint regionX = Util.WorldToRegionLoc((uint)x);
|
||||
uint regionY = Util.WorldToRegionLoc((uint)y);
|
||||
|
||||
// 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
|
||||
|
@ -222,11 +224,15 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
|
|||
{
|
||||
region = m_GridService.GetRegionByPosition(scopeID, x, y);
|
||||
if (region == null)
|
||||
{
|
||||
m_log.DebugFormat("{0} GetRegionByPosition. Region not found by grid service. Pos=<{1},{2}>",
|
||||
LogHeader, x, y);
|
||||
LogHeader, regionX, regionY);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_log.DebugFormat("{0} GetRegionByPosition. Requested region {1} from grid service. Pos=<{2},{3}>",
|
||||
LogHeader, region.RegionName, x, y);
|
||||
LogHeader, region.RegionName, regionX, regionY);
|
||||
}
|
||||
}
|
||||
return region;
|
||||
}
|
||||
|
|
|
@ -174,6 +174,7 @@ namespace OpenSim.Region.CoreModules.World.Terrain
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
// The flags of which terrain patches to send for each of the ScenePresence's
|
||||
private Dictionary<UUID, PatchUpdates> m_perClientPatchUpdates = new Dictionary<UUID, PatchUpdates>();
|
||||
|
||||
|
@ -1030,8 +1031,8 @@ namespace OpenSim.Region.CoreModules.World.Terrain
|
|||
List<PatchesToSend> toSend = GetModifiedPatchesInViewDistance(pups);
|
||||
if (toSend.Count > 0)
|
||||
{
|
||||
m_log.DebugFormat("{0} CheckSendingPatchesToClient: sending {1} patches to {2}",
|
||||
LogHeader, toSend.Count, pups.Presence.Name);
|
||||
// m_log.DebugFormat("{0} CheckSendingPatchesToClient: sending {1} patches to {2} in region {3}",
|
||||
// LogHeader, toSend.Count, pups.Presence.Name, m_scene.RegionInfo.RegionName);
|
||||
// Sort the patches to send by the distance from the presence
|
||||
toSend.Sort();
|
||||
foreach (PatchesToSend pts in toSend)
|
||||
|
@ -1067,8 +1068,10 @@ namespace OpenSim.Region.CoreModules.World.Terrain
|
|||
int endY = (((int) (presence.AbsolutePosition.Y + presence.DrawDistance))/Constants.TerrainPatchSize) + 2;
|
||||
endY = Math.Max(endY, 0);
|
||||
endY = Math.Min(endY, (int)m_scene.RegionInfo.RegionSizeY/Constants.TerrainPatchSize);
|
||||
m_log.DebugFormat("{0} GetModifiedPatchesInViewDistance. ddist={1}, start=<{2},{3}>, end=<{4},{5}>",
|
||||
LogHeader, presence.DrawDistance, startX, startY, endX, endY);
|
||||
// m_log.DebugFormat("{0} GetModifiedPatchesInViewDistance. rName={1}, ddist={2}, apos={3}, start=<{4},{5}>, end=<{6},{7}>",
|
||||
// LogHeader, m_scene.RegionInfo.RegionName,
|
||||
// presence.DrawDistance, presence.AbsolutePosition,
|
||||
// startX, startY, endX, endY);
|
||||
for (int x = startX; x < endX; x++)
|
||||
{
|
||||
for (int y = startY; y < endY; y++)
|
||||
|
@ -1079,7 +1082,7 @@ namespace OpenSim.Region.CoreModules.World.Terrain
|
|||
if (pups.GetByPatch(x, y))
|
||||
{
|
||||
//Check which has less distance, camera or avatar position, both have to be done.
|
||||
//Its not a radius, its a diameter and we add 50 so that it doesn't look like it cuts off
|
||||
//Its not a radius, its a diameter and we add 50 so that it doesn't look like it cuts off
|
||||
if (Util.DistanceLessThan(presencePos, patchPos, presence.DrawDistance + 50)
|
||||
|| Util.DistanceLessThan(presence.CameraPosition, patchPos, presence.DrawDistance + 50))
|
||||
{
|
||||
|
|
|
@ -52,6 +52,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
public class SceneCommunicationService //one instance per region
|
||||
{
|
||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
private static string LogHeader = "[SCENE COMMUNIATION SERVICE]";
|
||||
|
||||
protected RegionInfo m_regionInfo;
|
||||
protected Scene m_scene;
|
||||
|
@ -84,15 +85,12 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
if (neighbourService != null)
|
||||
neighbour = neighbourService.HelloNeighbour(regionhandle, region);
|
||||
else
|
||||
m_log.DebugFormat(
|
||||
"[SCENE COMMUNICATION SERVICE]: No neighbour service provided for region {0} to inform neigbhours of status",
|
||||
m_scene.Name);
|
||||
m_log.DebugFormat( "{0} neighbour service provided for region {0} to inform neigbhours of status", LogHeader, m_scene.Name);
|
||||
|
||||
if (neighbour != null)
|
||||
{
|
||||
m_log.DebugFormat(
|
||||
"[SCENE COMMUNICATION SERVICE]: Region {0} successfully informed neighbour {1} at {2}-{3} that it is up",
|
||||
m_scene.Name, neighbour.RegionName, Util.WorldToRegionLoc(x), Util.WorldToRegionLoc(y));
|
||||
m_log.DebugFormat( "{0} Region {1} successfully informed neighbour {2} at {3}-{4} that it is up",
|
||||
LogHeader, m_scene.Name, neighbour.RegionName, Util.WorldToRegionLoc(x), Util.WorldToRegionLoc(y));
|
||||
|
||||
m_scene.EventManager.TriggerOnRegionUp(neighbour);
|
||||
}
|
||||
|
@ -111,9 +109,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
List<GridRegion> neighbours
|
||||
= m_scene.GridService.GetNeighbours(m_scene.RegionInfo.ScopeID, m_scene.RegionInfo.RegionID);
|
||||
|
||||
m_log.DebugFormat(
|
||||
"[SCENE COMMUNICATION SERVICE]: Informing {0} neighbours that region {1} is up",
|
||||
neighbours.Count, m_scene.Name);
|
||||
m_log.DebugFormat("{0} Informing {1} neighbours that region {2} is up", LogHeader, neighbours.Count, m_scene.Name);
|
||||
|
||||
foreach (GridRegion n in neighbours)
|
||||
{
|
||||
|
|
|
@ -46,6 +46,7 @@ namespace OpenSim.Services.GridService
|
|||
private static readonly ILog m_log =
|
||||
LogManager.GetLogger(
|
||||
MethodBase.GetCurrentMethod().DeclaringType);
|
||||
private string LogHeader = "[GRID SERVICE]";
|
||||
|
||||
private bool m_DeleteOnUnregister = true;
|
||||
private static GridService m_RootInstance = null;
|
||||
|
@ -328,7 +329,11 @@ namespace OpenSim.Services.GridService
|
|||
}
|
||||
}
|
||||
|
||||
// m_log.DebugFormat("[GRID SERVICE]: region {0} has {1} neighbours", region.RegionName, rinfos.Count);
|
||||
// string rNames = "";
|
||||
// foreach (GridRegion gr in rinfos)
|
||||
// rNames += gr.RegionName + ",";
|
||||
// m_log.DebugFormat("{0} region {1} has {2} neighbours ({3})",
|
||||
// LogHeader, region.RegionName, rinfos.Count, rNames);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -657,7 +662,7 @@ namespace OpenSim.Services.GridService
|
|||
return;
|
||||
}
|
||||
|
||||
RegionData region = m_Database.Get((int)Util.RegionToWorldLoc(x), (int)Util.RegionToWorldLoc(y), UUID.Zero);
|
||||
RegionData region = m_Database.Get((int)Util.RegionToWorldLoc(x), (int)Util.RegionToWorldLoc(y), UUID.Zero);
|
||||
if (region == null)
|
||||
{
|
||||
MainConsole.Instance.OutputFormat("No region found at {0},{1}", x, y);
|
||||
|
|
Loading…
Reference in New Issue