diff options
author | Diva Canto | 2014-07-04 10:13:53 -0700 |
---|---|---|
committer | Diva Canto | 2014-07-04 10:13:53 -0700 |
commit | d99c8e68a701902feb717e15f06fc777a99708b6 (patch) | |
tree | 219d14b84e4289eb6bc51a762bdae2dbeaa5c3f3 | |
parent | Merge branch 'master' of ssh://opensimulator.org/var/git/opensim (diff) | |
download | opensim-SC-d99c8e68a701902feb717e15f06fc777a99708b6.zip opensim-SC-d99c8e68a701902feb717e15f06fc777a99708b6.tar.gz opensim-SC-d99c8e68a701902feb717e15f06fc777a99708b6.tar.bz2 opensim-SC-d99c8e68a701902feb717e15f06fc777a99708b6.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.cs | 12 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 4 |
2 files changed, 12 insertions, 4 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs index 7c3d50b..9abc8ae 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs | |||
@@ -822,7 +822,9 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
822 | } | 822 | } |
823 | 823 | ||
824 | // if (NeedsNewAgent(sp.DrawDistance, oldRegionX, newRegionX, oldRegionY, newRegionY)) | 824 | // if (NeedsNewAgent(sp.DrawDistance, oldRegionX, newRegionX, oldRegionY, newRegionY)) |
825 | if (NeedsNewAgent(sp.Scene.DefaultDrawDistance, oldRegionX, newRegionX, oldRegionY, newRegionY)) | 825 | float dist = (float)Math.Max(sp.Scene.DefaultDrawDistance, |
826 | (float)Math.Max(sp.Scene.RegionInfo.RegionSizeX, sp.Scene.RegionInfo.RegionSizeY)); | ||
827 | if (NeedsNewAgent(dist, oldRegionX, newRegionX, oldRegionY, newRegionY)) | ||
826 | { | 828 | { |
827 | // brand new agent, let's create a new caps seed | 829 | // brand new agent, let's create a new caps seed |
828 | agentCircuit.CapsPath = CapsUtil.GetRandomCapsObjectPath(); | 830 | agentCircuit.CapsPath = CapsUtil.GetRandomCapsObjectPath(); |
@@ -896,7 +898,9 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
896 | 898 | ||
897 | IClientIPEndpoint ipepClient; | 899 | IClientIPEndpoint ipepClient; |
898 | string capsPath = String.Empty; | 900 | string capsPath = String.Empty; |
899 | if (NeedsNewAgent(sp.Scene.DefaultDrawDistance, oldRegionX, newRegionX, oldRegionY, newRegionY)) | 901 | float dist = (float)Math.Max(sp.Scene.DefaultDrawDistance, |
902 | (float)Math.Max(sp.Scene.RegionInfo.RegionSizeX, sp.Scene.RegionInfo.RegionSizeY)); | ||
903 | if (NeedsNewAgent(dist, oldRegionX, newRegionX, oldRegionY, newRegionY)) | ||
900 | { | 904 | { |
901 | m_log.DebugFormat( | 905 | m_log.DebugFormat( |
902 | "[ENTITY TRANSFER MODULE]: Determined that region {0} at {1},{2} needs new child agent for incoming agent {3} from {4}", | 906 | "[ENTITY TRANSFER MODULE]: Determined that region {0} at {1},{2} needs new child agent for incoming agent {3} from {4}", |
@@ -1142,7 +1146,9 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
1142 | 1146 | ||
1143 | IClientIPEndpoint ipepClient; | 1147 | IClientIPEndpoint ipepClient; |
1144 | string capsPath = String.Empty; | 1148 | string capsPath = String.Empty; |
1145 | if (NeedsNewAgent(sp.Scene.DefaultDrawDistance, oldRegionX, newRegionX, oldRegionY, newRegionY)) | 1149 | float dist = (float)Math.Max(sp.Scene.DefaultDrawDistance, |
1150 | (float)Math.Max(sp.Scene.RegionInfo.RegionSizeX, sp.Scene.RegionInfo.RegionSizeY)); | ||
1151 | if (NeedsNewAgent(dist, oldRegionX, newRegionX, oldRegionY, newRegionY)) | ||
1146 | { | 1152 | { |
1147 | m_log.DebugFormat( | 1153 | m_log.DebugFormat( |
1148 | "[ENTITY TRANSFER MODULE]: Determined that region {0} at {1},{2} needs new child agent for agent {3} from {4}", | 1154 | "[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 063ac73..20c88e1 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -3734,7 +3734,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
3734 | 3734 | ||
3735 | // m_log.Debug("---> x: " + x + "; newx:" + newRegionX + "; Abs:" + (int)Math.Abs((int)(x - newRegionX))); | 3735 | // m_log.Debug("---> x: " + x + "; newx:" + newRegionX + "; Abs:" + (int)Math.Abs((int)(x - newRegionX))); |
3736 | // m_log.Debug("---> y: " + y + "; newy:" + newRegionY + "; Abs:" + (int)Math.Abs((int)(y - newRegionY))); | 3736 | // m_log.Debug("---> y: " + y + "; newy:" + newRegionY + "; Abs:" + (int)Math.Abs((int)(y - newRegionY))); |
3737 | if (Util.IsOutsideView(DrawDistance, x, newRegionX, y, newRegionY)) | 3737 | float dist = (float)Math.Max(Scene.DefaultDrawDistance, |
3738 | (float)Math.Max(Scene.RegionInfo.RegionSizeX, Scene.RegionInfo.RegionSizeY)); | ||
3739 | if (Util.IsOutsideView(dist, x, newRegionX, y, newRegionY)) | ||
3738 | { | 3740 | { |
3739 | byebyeRegions.Add(handle); | 3741 | byebyeRegions.Add(handle); |
3740 | } | 3742 | } |