try handle the special case MaxRegionsViewDistance = 0 (agents only see void around region, even if there are regions around
parent
3bc0690a7a
commit
5ed2b5c990
|
@ -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<GridRegion> RegionsInView(Vector3 pos, RegionInfo curregion, List<GridRegion> fullneighbours, float viewrange)
|
||||
{
|
||||
List<GridRegion> ret = new List<GridRegion>();
|
||||
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
|
|||
/// <param name="sp"></param>
|
||||
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<GridRegion> fullneighbours = GetNeighbors(sp);
|
||||
List<GridRegion> neighbours = RegionsInView(sp.AbsolutePosition, regionInfo, fullneighbours, sp.RegionViewDistance);
|
||||
List<GridRegion> neighbours;
|
||||
if (sp.RegionViewDistance > 0)
|
||||
{
|
||||
List<GridRegion> fullneighbours = GetNeighbors(sp);
|
||||
neighbours = RegionsInView(sp.AbsolutePosition, regionInfo, fullneighbours, sp.RegionViewDistance);
|
||||
}
|
||||
else
|
||||
neighbours = new List<GridRegion>();
|
||||
|
||||
LinkedList<ulong> previousRegionNeighbourHandles;
|
||||
Dictionary<ulong, string> 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<GridRegion> fullneighbours = GetNeighbors(sp);
|
||||
List<GridRegion> neighbours = RegionsInView(sp.AbsolutePosition, regionInfo, fullneighbours, sp.RegionViewDistance);
|
||||
List<GridRegion> neighbours;
|
||||
if (sp.RegionViewDistance > 0)
|
||||
{
|
||||
List<GridRegion> fullneighbours = GetNeighbors(sp);
|
||||
neighbours = RegionsInView(sp.AbsolutePosition, regionInfo, fullneighbours, sp.RegionViewDistance);
|
||||
}
|
||||
else
|
||||
neighbours = new List<GridRegion>();
|
||||
|
||||
LinkedList<ulong> previousRegionNeighbourHandles = new LinkedList<ulong>(sp.KnownRegions.Keys);
|
||||
|
||||
|
@ -2342,8 +2366,14 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
|||
|
||||
ulong currentRegionHandler = regionInfo.RegionHandle;
|
||||
|
||||
List<GridRegion> fullneighbours = GetNeighbors(sp);
|
||||
List<GridRegion> neighbours = RegionsInView(sp.AbsolutePosition, regionInfo, fullneighbours, sp.RegionViewDistance);
|
||||
List<GridRegion> neighbours;
|
||||
if (sp.RegionViewDistance > 0)
|
||||
{
|
||||
List<GridRegion> fullneighbours = GetNeighbors(sp);
|
||||
neighbours = RegionsInView(sp.AbsolutePosition, regionInfo, fullneighbours, sp.RegionViewDistance);
|
||||
}
|
||||
else
|
||||
neighbours = new List<GridRegion>();
|
||||
|
||||
LinkedList<ulong> previousRegionNeighbourHandles;
|
||||
Dictionary<ulong, string> seeds;
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue