diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs index 86685587a9..75d7bc555f 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs @@ -1057,6 +1057,15 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer } } } + else + { + if(!sp.IsInLocalTransit || sp.RegionViewDistance == 0) + { + // this will be closed by callback + if (agentCircuit.ChildrenCapSeeds != null) + agentCircuit.ChildrenCapSeeds.Remove(sp.RegionHandle); + } + } string capsPath = finalDestination.ServerURI + CapsUtil.GetCapsSeedPath(agentCircuit.CapsPath);; @@ -1129,7 +1138,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer agent.SenderWantsToWaitForRoot = true; - if(!sp.IsInLocalTransit) + if(!sp.IsInLocalTransit || sp.RegionViewDistance == 0) SetNewCallbackURL(agent, sp.Scene.RegionInfo); // Reset the do not close flag. This must be done before the destination opens child connections (here @@ -1565,6 +1574,9 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer public ScenePresence CrossAsync(ScenePresence agent, bool isFlying) { + if(agent.RegionViewDistance == 0) + return agent; + Vector3 newpos; EntityTransferContext ctx = new EntityTransferContext(); string failureReason; @@ -1994,7 +2006,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer List RegionsInView(Vector3 pos, RegionInfo curregion, List fullneighbours, float viewrange) { List ret = new List(); - if(fullneighbours.Count == 0) + if(fullneighbours.Count == 0 || viewrange == 0) return ret; int curX = (int)Util.RegionToWorldLoc(curregion.RegionLocX) + (int)pos.X; @@ -2036,7 +2048,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer /// public void EnableChildAgents(ScenePresence sp) { - // assumes that out of view range regions are disconnected by the previus region + // assumes that out of view range regions are disconnected by the previous region Scene spScene = sp.Scene; RegionInfo regionInfo = spScene.RegionInfo; @@ -2046,8 +2058,14 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer ulong currentRegionHandler = regionInfo.RegionHandle; - List fullneighbours = GetNeighbors(sp); - List neighbours = RegionsInView(sp.AbsolutePosition, regionInfo, fullneighbours, sp.RegionViewDistance); + List neighbours; + if (sp.RegionViewDistance > 0) + { + List fullneighbours = GetNeighbors(sp); + neighbours = RegionsInView(sp.AbsolutePosition, regionInfo, fullneighbours, sp.RegionViewDistance); + } + else + neighbours = new List(); LinkedList previousRegionNeighbourHandles; Dictionary seeds; @@ -2212,7 +2230,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer public void CheckChildAgents(ScenePresence sp) { - // assumes that out of view range regions are disconnected by the previus region + // assumes that out of view range regions are disconnected by the previous region Scene spScene = sp.Scene; RegionInfo regionInfo = spScene.RegionInfo; @@ -2222,8 +2240,14 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer ulong currentRegionHandler = regionInfo.RegionHandle; - List fullneighbours = GetNeighbors(sp); - List neighbours = RegionsInView(sp.AbsolutePosition, regionInfo, fullneighbours, sp.RegionViewDistance); + List neighbours; + if (sp.RegionViewDistance > 0) + { + List fullneighbours = GetNeighbors(sp); + neighbours = RegionsInView(sp.AbsolutePosition, regionInfo, fullneighbours, sp.RegionViewDistance); + } + else + neighbours = new List(); LinkedList previousRegionNeighbourHandles = new LinkedList(sp.KnownRegions.Keys); @@ -2342,8 +2366,14 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer ulong currentRegionHandler = regionInfo.RegionHandle; - List fullneighbours = GetNeighbors(sp); - List neighbours = RegionsInView(sp.AbsolutePosition, regionInfo, fullneighbours, sp.RegionViewDistance); + List neighbours; + if (sp.RegionViewDistance > 0) + { + List fullneighbours = GetNeighbors(sp); + neighbours = RegionsInView(sp.AbsolutePosition, regionInfo, fullneighbours, sp.RegionViewDistance); + } + else + neighbours = new List(); LinkedList previousRegionNeighbourHandles; Dictionary seeds; diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index c728d9b235..aea3a8db47 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -1651,8 +1651,7 @@ namespace OpenSim.Region.Framework.Scenes m_previusParcelUUID = UUID.Zero; m_currentParcelHide = false; m_currentParcelUUID = UUID.Zero; - // FIXME: Set RegionHandle to the region handle of the scene this agent is moving into - + CollisionPlane = Vector4.UnitW; // we need to kill this on agents that do not see the new region @@ -4439,7 +4438,7 @@ namespace OpenSim.Region.Framework.Scenes // updates priority recalc checkRePrioritization(); - if(m_childUpdatesBusy) + if(m_childUpdatesBusy || RegionViewDistance == 0) return; int tdiff = Util.EnvironmentTickCountSubtract(m_lastChildUpdatesTime);