aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/World
diff options
context:
space:
mode:
authorRobert Adams2014-05-31 12:10:50 -0700
committerRobert Adams2014-05-31 12:19:51 -0700
commit0300ec45ebc7b8696c64bf4575bf674a6b1a8fa7 (patch)
treeb76e90c764c068ab65fde1ead2016ba9edafcb58 /OpenSim/Region/CoreModules/World
parentvarregion: More tweeking to only sending patches within avatar draw distance. (diff)
downloadopensim-SC_OLD-0300ec45ebc7b8696c64bf4575bf674a6b1a8fa7.zip
opensim-SC_OLD-0300ec45ebc7b8696c64bf4575bf674a6b1a8fa7.tar.gz
opensim-SC_OLD-0300ec45ebc7b8696c64bf4575bf674a6b1a8fa7.tar.bz2
opensim-SC_OLD-0300ec45ebc7b8696c64bf4575bf674a6b1a8fa7.tar.xz
Modifications to debugging printouts. No functional changes.
Diffstat (limited to 'OpenSim/Region/CoreModules/World')
-rw-r--r--OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs13
1 files changed, 8 insertions, 5 deletions
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 {