aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/LocalGridServiceConnector.cs10
-rw-r--r--OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs13
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs14
3 files changed, 21 insertions, 16 deletions
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/LocalGridServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/LocalGridServiceConnector.cs
index 3b38c71..d5fca71 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/LocalGridServiceConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/LocalGridServiceConnector.cs
@@ -199,6 +199,8 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
199 public GridRegion GetRegionByPosition(UUID scopeID, int x, int y) 199 public GridRegion GetRegionByPosition(UUID scopeID, int x, int y)
200 { 200 {
201 GridRegion region = null; 201 GridRegion region = null;
202 uint regionX = Util.WorldToRegionLoc((uint)x);
203 uint regionY = Util.WorldToRegionLoc((uint)y);
202 204
203 // First see if it's a neighbour, even if it isn't on this sim. 205 // First see if it's a neighbour, even if it isn't on this sim.
204 // Neighbour data is cached in memory, so this is fast 206 // Neighbour data is cached in memory, so this is fast
@@ -222,11 +224,15 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
222 { 224 {
223 region = m_GridService.GetRegionByPosition(scopeID, x, y); 225 region = m_GridService.GetRegionByPosition(scopeID, x, y);
224 if (region == null) 226 if (region == null)
227 {
225 m_log.DebugFormat("{0} GetRegionByPosition. Region not found by grid service. Pos=<{1},{2}>", 228 m_log.DebugFormat("{0} GetRegionByPosition. Region not found by grid service. Pos=<{1},{2}>",
226 LogHeader, x, y); 229 LogHeader, regionX, regionY);
230 }
227 else 231 else
232 {
228 m_log.DebugFormat("{0} GetRegionByPosition. Requested region {1} from grid service. Pos=<{2},{3}>", 233 m_log.DebugFormat("{0} GetRegionByPosition. Requested region {1} from grid service. Pos=<{2},{3}>",
229 LogHeader, region.RegionName, x, y); 234 LogHeader, region.RegionName, regionX, regionY);
235 }
230 } 236 }
231 return region; 237 return region;
232 } 238 }
diff --git a/OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs b/OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs
index ad17d6d..c22c5b6 100644
--- a/OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs
+++ b/OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs
@@ -174,6 +174,7 @@ namespace OpenSim.Region.CoreModules.World.Terrain
174 } 174 }
175 } 175 }
176 } 176 }
177
177 // The flags of which terrain patches to send for each of the ScenePresence's 178 // The flags of which terrain patches to send for each of the ScenePresence's
178 private Dictionary<UUID, PatchUpdates> m_perClientPatchUpdates = new Dictionary<UUID, PatchUpdates>(); 179 private Dictionary<UUID, PatchUpdates> m_perClientPatchUpdates = new Dictionary<UUID, PatchUpdates>();
179 180
@@ -1030,8 +1031,8 @@ namespace OpenSim.Region.CoreModules.World.Terrain
1030 List<PatchesToSend> toSend = GetModifiedPatchesInViewDistance(pups); 1031 List<PatchesToSend> toSend = GetModifiedPatchesInViewDistance(pups);
1031 if (toSend.Count > 0) 1032 if (toSend.Count > 0)
1032 { 1033 {
1033 m_log.DebugFormat("{0} CheckSendingPatchesToClient: sending {1} patches to {2}", 1034 // m_log.DebugFormat("{0} CheckSendingPatchesToClient: sending {1} patches to {2} in region {3}",
1034 LogHeader, toSend.Count, pups.Presence.Name); 1035 // LogHeader, toSend.Count, pups.Presence.Name, m_scene.RegionInfo.RegionName);
1035 // Sort the patches to send by the distance from the presence 1036 // Sort the patches to send by the distance from the presence
1036 toSend.Sort(); 1037 toSend.Sort();
1037 foreach (PatchesToSend pts in toSend) 1038 foreach (PatchesToSend pts in toSend)
@@ -1067,8 +1068,10 @@ namespace OpenSim.Region.CoreModules.World.Terrain
1067 int endY = (((int) (presence.AbsolutePosition.Y + presence.DrawDistance))/Constants.TerrainPatchSize) + 2; 1068 int endY = (((int) (presence.AbsolutePosition.Y + presence.DrawDistance))/Constants.TerrainPatchSize) + 2;
1068 endY = Math.Max(endY, 0); 1069 endY = Math.Max(endY, 0);
1069 endY = Math.Min(endY, (int)m_scene.RegionInfo.RegionSizeY/Constants.TerrainPatchSize); 1070 endY = Math.Min(endY, (int)m_scene.RegionInfo.RegionSizeY/Constants.TerrainPatchSize);
1070 m_log.DebugFormat("{0} GetModifiedPatchesInViewDistance. ddist={1}, start=<{2},{3}>, end=<{4},{5}>", 1071 // m_log.DebugFormat("{0} GetModifiedPatchesInViewDistance. rName={1}, ddist={2}, apos={3}, start=<{4},{5}>, end=<{6},{7}>",
1071 LogHeader, presence.DrawDistance, startX, startY, endX, endY); 1072 // LogHeader, m_scene.RegionInfo.RegionName,
1073 // presence.DrawDistance, presence.AbsolutePosition,
1074 // startX, startY, endX, endY);
1072 for (int x = startX; x < endX; x++) 1075 for (int x = startX; x < endX; x++)
1073 { 1076 {
1074 for (int y = startY; y < endY; y++) 1077 for (int y = startY; y < endY; y++)
@@ -1079,7 +1082,7 @@ namespace OpenSim.Region.CoreModules.World.Terrain
1079 if (pups.GetByPatch(x, y)) 1082 if (pups.GetByPatch(x, y))
1080 { 1083 {
1081 //Check which has less distance, camera or avatar position, both have to be done. 1084 //Check which has less distance, camera or avatar position, both have to be done.
1082 //Its not a radius, its a diameter and we add 50 so that it doesn't look like it cuts off 1085 //Its not a radius, its a diameter and we add 50 so that it doesn't look like it cuts off
1083 if (Util.DistanceLessThan(presencePos, patchPos, presence.DrawDistance + 50) 1086 if (Util.DistanceLessThan(presencePos, patchPos, presence.DrawDistance + 50)
1084 || Util.DistanceLessThan(presence.CameraPosition, patchPos, presence.DrawDistance + 50)) 1087 || Util.DistanceLessThan(presence.CameraPosition, patchPos, presence.DrawDistance + 50))
1085 { 1088 {
diff --git a/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs b/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs
index c873e40..45c3348 100644
--- a/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs
@@ -52,6 +52,7 @@ namespace OpenSim.Region.Framework.Scenes
52 public class SceneCommunicationService //one instance per region 52 public class SceneCommunicationService //one instance per region
53 { 53 {
54 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 54 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
55 private static string LogHeader = "[SCENE COMMUNIATION SERVICE]";
55 56
56 protected RegionInfo m_regionInfo; 57 protected RegionInfo m_regionInfo;
57 protected Scene m_scene; 58 protected Scene m_scene;
@@ -84,15 +85,12 @@ namespace OpenSim.Region.Framework.Scenes
84 if (neighbourService != null) 85 if (neighbourService != null)
85 neighbour = neighbourService.HelloNeighbour(regionhandle, region); 86 neighbour = neighbourService.HelloNeighbour(regionhandle, region);
86 else 87 else
87 m_log.DebugFormat( 88 m_log.DebugFormat( "{0} neighbour service provided for region {0} to inform neigbhours of status", LogHeader, m_scene.Name);
88 "[SCENE COMMUNICATION SERVICE]: No neighbour service provided for region {0} to inform neigbhours of status",
89 m_scene.Name);
90 89
91 if (neighbour != null) 90 if (neighbour != null)
92 { 91 {
93 m_log.DebugFormat( 92 m_log.DebugFormat( "{0} Region {1} successfully informed neighbour {2} at {3}-{4} that it is up",
94 "[SCENE COMMUNICATION SERVICE]: Region {0} successfully informed neighbour {1} at {2}-{3} that it is up", 93 LogHeader, m_scene.Name, neighbour.RegionName, Util.WorldToRegionLoc(x), Util.WorldToRegionLoc(y));
95 m_scene.Name, neighbour.RegionName, Util.WorldToRegionLoc(x), Util.WorldToRegionLoc(y));
96 94
97 m_scene.EventManager.TriggerOnRegionUp(neighbour); 95 m_scene.EventManager.TriggerOnRegionUp(neighbour);
98 } 96 }
@@ -111,9 +109,7 @@ namespace OpenSim.Region.Framework.Scenes
111 List<GridRegion> neighbours 109 List<GridRegion> neighbours
112 = m_scene.GridService.GetNeighbours(m_scene.RegionInfo.ScopeID, m_scene.RegionInfo.RegionID); 110 = m_scene.GridService.GetNeighbours(m_scene.RegionInfo.ScopeID, m_scene.RegionInfo.RegionID);
113 111
114 m_log.DebugFormat( 112 m_log.DebugFormat("{0} Informing {1} neighbours that region {2} is up", LogHeader, neighbours.Count, m_scene.Name);
115 "[SCENE COMMUNICATION SERVICE]: Informing {0} neighbours that region {1} is up",
116 neighbours.Count, m_scene.Name);
117 113
118 foreach (GridRegion n in neighbours) 114 foreach (GridRegion n in neighbours)
119 { 115 {