aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/Framework
diff options
context:
space:
mode:
authorRobert Adams2014-03-20 22:10:27 -0700
committerRobert Adams2014-05-31 12:19:50 -0700
commit22dade6463ce55945c5059af0dc115318297dc1c (patch)
tree6e537b8856c5484ab54014625b38f45003aa6bd1 /OpenSim/Region/CoreModules/Framework
parentvarregion: send terrain patches from where the avatar outward if the parameter (diff)
downloadopensim-SC-22dade6463ce55945c5059af0dc115318297dc1c.zip
opensim-SC-22dade6463ce55945c5059af0dc115318297dc1c.tar.gz
opensim-SC-22dade6463ce55945c5059af0dc115318297dc1c.tar.bz2
opensim-SC-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/Framework')
-rw-r--r--OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs13
1 files changed, 7 insertions, 6 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
index e583590..70b0e0a 100644
--- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
@@ -820,7 +820,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
820 agentCircuit.Id0 = currentAgentCircuit.Id0; 820 agentCircuit.Id0 = currentAgentCircuit.Id0;
821 } 821 }
822 822
823 if (NeedsNewAgent(sp.DrawDistance, oldRegionX, newRegionX, oldRegionY, newRegionY)) 823 // if (NeedsNewAgent(sp.DrawDistance, oldRegionX, newRegionX, oldRegionY, newRegionY))
824 if (NeedsNewAgent(sp.Scene.DefaultDrawDistance, oldRegionX, newRegionX, oldRegionY, newRegionY))
824 { 825 {
825 // brand new agent, let's create a new caps seed 826 // brand new agent, let's create a new caps seed
826 agentCircuit.CapsPath = CapsUtil.GetRandomCapsObjectPath(); 827 agentCircuit.CapsPath = CapsUtil.GetRandomCapsObjectPath();
@@ -894,7 +895,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
894 895
895 IClientIPEndpoint ipepClient; 896 IClientIPEndpoint ipepClient;
896 string capsPath = String.Empty; 897 string capsPath = String.Empty;
897 if (NeedsNewAgent(sp.DrawDistance, oldRegionX, newRegionX, oldRegionY, newRegionY)) 898 if (NeedsNewAgent(sp.Scene.DefaultDrawDistance, oldRegionX, newRegionX, oldRegionY, newRegionY))
898 { 899 {
899 m_log.DebugFormat( 900 m_log.DebugFormat(
900 "[ENTITY TRANSFER MODULE]: Determined that region {0} at {1},{2} needs new child agent for incoming agent {3} from {4}", 901 "[ENTITY TRANSFER MODULE]: Determined that region {0} at {1},{2} needs new child agent for incoming agent {3} from {4}",
@@ -1070,7 +1071,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1070 1071
1071 // Finally, let's close this previously-known-as-root agent, when the jump is outside the view zone 1072 // Finally, let's close this previously-known-as-root agent, when the jump is outside the view zone
1072 1073
1073 if (NeedsClosing(sp.DrawDistance, oldRegionX, newRegionX, oldRegionY, newRegionY, reg)) 1074 if (NeedsClosing(sp.Scene.DefaultDrawDistance, oldRegionX, newRegionX, oldRegionY, newRegionY, reg))
1074 { 1075 {
1075 if (!sp.Scene.IncomingPreCloseClient(sp)) 1076 if (!sp.Scene.IncomingPreCloseClient(sp))
1076 return; 1077 return;
@@ -1140,7 +1141,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1140 1141
1141 IClientIPEndpoint ipepClient; 1142 IClientIPEndpoint ipepClient;
1142 string capsPath = String.Empty; 1143 string capsPath = String.Empty;
1143 if (NeedsNewAgent(sp.DrawDistance, oldRegionX, newRegionX, oldRegionY, newRegionY)) 1144 if (NeedsNewAgent(sp.Scene.DefaultDrawDistance, oldRegionX, newRegionX, oldRegionY, newRegionY))
1144 { 1145 {
1145 m_log.DebugFormat( 1146 m_log.DebugFormat(
1146 "[ENTITY TRANSFER MODULE]: Determined that region {0} at {1},{2} needs new child agent for agent {3} from {4}", 1147 "[ENTITY TRANSFER MODULE]: Determined that region {0} at {1},{2} needs new child agent for agent {3} from {4}",
@@ -1236,7 +1237,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1236 sp.MakeChildAgent(); 1237 sp.MakeChildAgent();
1237 1238
1238 // Finally, let's close this previously-known-as-root agent, when the jump is outside the view zone 1239 // Finally, let's close this previously-known-as-root agent, when the jump is outside the view zone
1239 if (NeedsClosing(sp.DrawDistance, oldRegionX, newRegionX, oldRegionY, newRegionY, reg)) 1240 if (NeedsClosing(sp.Scene.DefaultDrawDistance, oldRegionX, newRegionX, oldRegionY, newRegionY, reg))
1240 { 1241 {
1241 if (!sp.Scene.IncomingPreCloseClient(sp)) 1242 if (!sp.Scene.IncomingPreCloseClient(sp))
1242 return; 1243 return;
@@ -2366,7 +2367,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
2366 { 2367 {
2367 // The area to check is as big as the current region. 2368 // The area to check is as big as the current region.
2368 // We presume all adjacent regions are the same size as this region. 2369 // We presume all adjacent regions are the same size as this region.
2369 uint dd = Math.Max((uint)avatar.DrawDistance, 2370 uint dd = Math.Max((uint)avatar.Scene.DefaultDrawDistance,
2370 Math.Max(Scene.RegionInfo.RegionSizeX, Scene.RegionInfo.RegionSizeY)); 2371 Math.Max(Scene.RegionInfo.RegionSizeX, Scene.RegionInfo.RegionSizeY));
2371 2372
2372 uint startX = Util.RegionToWorldLoc(pRegionLocX) - dd + Constants.RegionSize/2; 2373 uint startX = Util.RegionToWorldLoc(pRegionLocX) - dd + Constants.RegionSize/2;