diff options
author | Robert Adams | 2014-03-20 22:10:27 -0700 |
---|---|---|
committer | Robert Adams | 2014-05-31 12:19:50 -0700 |
commit | 22dade6463ce55945c5059af0dc115318297dc1c (patch) | |
tree | 6e537b8856c5484ab54014625b38f45003aa6bd1 /OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs | |
parent | varregion: send terrain patches from where the avatar outward if the parameter (diff) | |
download | opensim-SC_OLD-22dade6463ce55945c5059af0dc115318297dc1c.zip opensim-SC_OLD-22dade6463ce55945c5059af0dc115318297dc1c.tar.gz opensim-SC_OLD-22dade6463ce55945c5059af0dc115318297dc1c.tar.bz2 opensim-SC_OLD-22dade6463ce55945c5059af0dc115318297dc1c.tar.xz |
varregion: More tweeking to only sending patches within avatar draw distance.
Still has problems with child avatars.
Diffstat (limited to 'OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs')
-rw-r--r-- | OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs b/OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs index 0d7321d..ad17d6d 100644 --- a/OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs +++ b/OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs | |||
@@ -1054,7 +1054,7 @@ namespace OpenSim.Region.CoreModules.World.Terrain | |||
1054 | if (presence == null) | 1054 | if (presence == null) |
1055 | return ret; | 1055 | return ret; |
1056 | 1056 | ||
1057 | // See if there are patches within our view distance to send. | 1057 | // Compute the area of patches within our draw distance |
1058 | int startX = (((int) (presence.AbsolutePosition.X - presence.DrawDistance))/Constants.TerrainPatchSize) - 2; | 1058 | int startX = (((int) (presence.AbsolutePosition.X - presence.DrawDistance))/Constants.TerrainPatchSize) - 2; |
1059 | startX = Math.Max(startX, 0); | 1059 | startX = Math.Max(startX, 0); |
1060 | startX = Math.Min(startX, (int)m_scene.RegionInfo.RegionSizeX/Constants.TerrainPatchSize); | 1060 | startX = Math.Min(startX, (int)m_scene.RegionInfo.RegionSizeX/Constants.TerrainPatchSize); |
@@ -1067,8 +1067,8 @@ namespace OpenSim.Region.CoreModules.World.Terrain | |||
1067 | int endY = (((int) (presence.AbsolutePosition.Y + presence.DrawDistance))/Constants.TerrainPatchSize) + 2; | 1067 | int endY = (((int) (presence.AbsolutePosition.Y + presence.DrawDistance))/Constants.TerrainPatchSize) + 2; |
1068 | endY = Math.Max(endY, 0); | 1068 | endY = Math.Max(endY, 0); |
1069 | endY = Math.Min(endY, (int)m_scene.RegionInfo.RegionSizeY/Constants.TerrainPatchSize); | 1069 | endY = Math.Min(endY, (int)m_scene.RegionInfo.RegionSizeY/Constants.TerrainPatchSize); |
1070 | // m_log.DebugFormat("{0} GetModifiedPatchesInViewDistance. start=<{1},{2}>, end=<{3},{4}>", | 1070 | m_log.DebugFormat("{0} GetModifiedPatchesInViewDistance. ddist={1}, start=<{2},{3}>, end=<{4},{5}>", |
1071 | // LogHeader, startX, startY, endX, endY); | 1071 | LogHeader, presence.DrawDistance, startX, startY, endX, endY); |
1072 | for (int x = startX; x < endX; x++) | 1072 | for (int x = startX; x < endX; x++) |
1073 | { | 1073 | { |
1074 | for (int y = startY; y < endY; y++) | 1074 | for (int y = startY; y < endY; y++) |