diff options
author | Robert Adams | 2014-05-31 12:10:50 -0700 |
---|---|---|
committer | Robert Adams | 2014-05-31 12:19:51 -0700 |
commit | 0300ec45ebc7b8696c64bf4575bf674a6b1a8fa7 (patch) | |
tree | b76e90c764c068ab65fde1ead2016ba9edafcb58 /OpenSim/Region/CoreModules | |
parent | varregion: More tweeking to only sending patches within avatar draw distance. (diff) | |
download | opensim-SC-0300ec45ebc7b8696c64bf4575bf674a6b1a8fa7.zip opensim-SC-0300ec45ebc7b8696c64bf4575bf674a6b1a8fa7.tar.gz opensim-SC-0300ec45ebc7b8696c64bf4575bf674a6b1a8fa7.tar.bz2 opensim-SC-0300ec45ebc7b8696c64bf4575bf674a6b1a8fa7.tar.xz |
Modifications to debugging printouts. No functional changes.
Diffstat (limited to 'OpenSim/Region/CoreModules')
-rw-r--r-- | OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/LocalGridServiceConnector.cs | 10 | ||||
-rw-r--r-- | OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs | 13 |
2 files changed, 16 insertions, 7 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 | { |