aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorDiva Canto2014-07-04 10:13:53 -0700
committerJustin Clark-Casey2014-08-02 00:51:36 +0100
commit4e3a2d3a64817e41bda18f4d39ca7e6940c69d98 (patch)
treea9cf023eeafe3e4b9ebdad21c20458dba714259b
parentAvoid an exception in creating child agents some times. (diff)
downloadopensim-SC_OLD-4e3a2d3a64817e41bda18f4d39ca7e6940c69d98.zip
opensim-SC_OLD-4e3a2d3a64817e41bda18f4d39ca7e6940c69d98.tar.gz
opensim-SC_OLD-4e3a2d3a64817e41bda18f4d39ca7e6940c69d98.tar.bz2
opensim-SC_OLD-4e3a2d3a64817e41bda18f4d39ca7e6940c69d98.tar.xz
It turns out that child agent management has had a bug for a while: there was an inconsistency in the scope between opening and closing child agents in neighboring regions. For opening (in EnableChildAgents), the region's DrawDistance was being used; for closing (in IsOUtsideView) , the viewer's (SP) DrawDistance was being used. This fixes this inconsistency, therefore eliminating bugs observed in TPs between, at least, neighboring varregions.
-rw-r--r--OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs19
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs4
2 files changed, 22 insertions, 1 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
index d20dbf2..e4bbe6b 100644
--- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
@@ -821,7 +821,14 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
821 agentCircuit.Id0 = currentAgentCircuit.Id0; 821 agentCircuit.Id0 = currentAgentCircuit.Id0;
822 } 822 }
823 823
824<<<<<<< HEAD
824 if (NeedsNewAgent(sp.DrawDistance, oldRegionX, newRegionX, oldRegionY, newRegionY)) 825 if (NeedsNewAgent(sp.DrawDistance, oldRegionX, newRegionX, oldRegionY, newRegionY))
826=======
827 // if (NeedsNewAgent(sp.DrawDistance, oldRegionX, newRegionX, oldRegionY, newRegionY))
828 float dist = (float)Math.Max(sp.Scene.DefaultDrawDistance,
829 (float)Math.Max(sp.Scene.RegionInfo.RegionSizeX, sp.Scene.RegionInfo.RegionSizeY));
830 if (NeedsNewAgent(dist, oldRegionX, newRegionX, oldRegionY, newRegionY))
831>>>>>>> d99c8e6... It turns out that child agent management has had a bug for a while: there was an inconsistency in the scope between opening and closing child agents in neighboring regions. For opening (in EnableChildAgents), the region's DrawDistance was being used; for closing (in IsOUtsideView) , the viewer's (SP) DrawDistance was being used. This fixes this inconsistency, therefore eliminating bugs observed in TPs between, at least, neighboring varregions.
825 { 832 {
826 // brand new agent, let's create a new caps seed 833 // brand new agent, let's create a new caps seed
827 agentCircuit.CapsPath = CapsUtil.GetRandomCapsObjectPath(); 834 agentCircuit.CapsPath = CapsUtil.GetRandomCapsObjectPath();
@@ -895,7 +902,13 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
895 902
896 IClientIPEndpoint ipepClient; 903 IClientIPEndpoint ipepClient;
897 string capsPath = String.Empty; 904 string capsPath = String.Empty;
905<<<<<<< HEAD
898 if (NeedsNewAgent(sp.DrawDistance, oldRegionX, newRegionX, oldRegionY, newRegionY)) 906 if (NeedsNewAgent(sp.DrawDistance, oldRegionX, newRegionX, oldRegionY, newRegionY))
907=======
908 float dist = (float)Math.Max(sp.Scene.DefaultDrawDistance,
909 (float)Math.Max(sp.Scene.RegionInfo.RegionSizeX, sp.Scene.RegionInfo.RegionSizeY));
910 if (NeedsNewAgent(dist, oldRegionX, newRegionX, oldRegionY, newRegionY))
911>>>>>>> d99c8e6... It turns out that child agent management has had a bug for a while: there was an inconsistency in the scope between opening and closing child agents in neighboring regions. For opening (in EnableChildAgents), the region's DrawDistance was being used; for closing (in IsOUtsideView) , the viewer's (SP) DrawDistance was being used. This fixes this inconsistency, therefore eliminating bugs observed in TPs between, at least, neighboring varregions.
899 { 912 {
900 m_log.DebugFormat( 913 m_log.DebugFormat(
901 "[ENTITY TRANSFER MODULE]: Determined that region {0} at {1},{2} needs new child agent for incoming agent {3} from {4}", 914 "[ENTITY TRANSFER MODULE]: Determined that region {0} at {1},{2} needs new child agent for incoming agent {3} from {4}",
@@ -1141,7 +1154,13 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1141 1154
1142 IClientIPEndpoint ipepClient; 1155 IClientIPEndpoint ipepClient;
1143 string capsPath = String.Empty; 1156 string capsPath = String.Empty;
1157<<<<<<< HEAD
1144 if (NeedsNewAgent(sp.DrawDistance, oldRegionX, newRegionX, oldRegionY, newRegionY)) 1158 if (NeedsNewAgent(sp.DrawDistance, oldRegionX, newRegionX, oldRegionY, newRegionY))
1159=======
1160 float dist = (float)Math.Max(sp.Scene.DefaultDrawDistance,
1161 (float)Math.Max(sp.Scene.RegionInfo.RegionSizeX, sp.Scene.RegionInfo.RegionSizeY));
1162 if (NeedsNewAgent(dist, oldRegionX, newRegionX, oldRegionY, newRegionY))
1163>>>>>>> d99c8e6... It turns out that child agent management has had a bug for a while: there was an inconsistency in the scope between opening and closing child agents in neighboring regions. For opening (in EnableChildAgents), the region's DrawDistance was being used; for closing (in IsOUtsideView) , the viewer's (SP) DrawDistance was being used. This fixes this inconsistency, therefore eliminating bugs observed in TPs between, at least, neighboring varregions.
1145 { 1164 {
1146 m_log.DebugFormat( 1165 m_log.DebugFormat(
1147 "[ENTITY TRANSFER MODULE]: Determined that region {0} at {1},{2} needs new child agent for agent {3} from {4}", 1166 "[ENTITY TRANSFER MODULE]: Determined that region {0} at {1},{2} needs new child agent for agent {3} from {4}",
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index 37353c1..17f6301 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -3733,7 +3733,9 @@ namespace OpenSim.Region.Framework.Scenes
3733 3733
3734// m_log.Debug("---> x: " + x + "; newx:" + newRegionX + "; Abs:" + (int)Math.Abs((int)(x - newRegionX))); 3734// m_log.Debug("---> x: " + x + "; newx:" + newRegionX + "; Abs:" + (int)Math.Abs((int)(x - newRegionX)));
3735// m_log.Debug("---> y: " + y + "; newy:" + newRegionY + "; Abs:" + (int)Math.Abs((int)(y - newRegionY))); 3735// m_log.Debug("---> y: " + y + "; newy:" + newRegionY + "; Abs:" + (int)Math.Abs((int)(y - newRegionY)));
3736 if (Util.IsOutsideView(DrawDistance, x, newRegionX, y, newRegionY)) 3736 float dist = (float)Math.Max(Scene.DefaultDrawDistance,
3737 (float)Math.Max(Scene.RegionInfo.RegionSizeX, Scene.RegionInfo.RegionSizeY));
3738 if (Util.IsOutsideView(dist, x, newRegionX, y, newRegionY))
3737 { 3739 {
3738 byebyeRegions.Add(handle); 3740 byebyeRegions.Add(handle);
3739 } 3741 }