change visible regions also by view range change; fix check on crossings

0.9.1.0-post-fixes
UbitUmarov 2019-04-04 20:16:23 +01:00
parent a56f40470e
commit 50c810549c
2 changed files with 11 additions and 7 deletions

View File

@ -1785,11 +1785,14 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
cAgent.Position = pos;
cAgent.ChildrenCapSeeds = agent.KnownRegions;
childRegionsToClose = agent.GetChildAgentsToClose(neighbourRegion.RegionHandle, neighbourRegion.RegionSizeX, neighbourRegion.RegionSizeY);
if(cAgent.ChildrenCapSeeds != null)
if(ctx.OutboundVersion < 0.7f)
{
foreach(ulong regh in childRegionsToClose)
cAgent.ChildrenCapSeeds.Remove(regh);
childRegionsToClose = agent.GetChildAgentsToClose(neighbourRegion.RegionHandle, neighbourRegion.RegionSizeX, neighbourRegion.RegionSizeY);
if(cAgent.ChildrenCapSeeds != null)
{
foreach(ulong regh in childRegionsToClose)
cAgent.ChildrenCapSeeds.Remove(regh);
}
}
if (isFlying)

View File

@ -4415,10 +4415,12 @@ namespace OpenSim.Region.Framework.Scenes
if (tdiff < CHILDUPDATES_TIME)
return;
bool viewchanged = Math.Abs(DrawDistance - m_lastChildAgentUpdateDrawDistance) > 32.0f;
IEntityTransferModule m_agentTransfer = m_scene.RequestModuleInterface<IEntityTransferModule>();
float dx = pos.X - m_lastChildAgentCheckPosition.Y;
float dx = pos.X - m_lastChildAgentCheckPosition.X;
float dy = pos.Y - m_lastChildAgentCheckPosition.Y;
if ((m_agentTransfer != null) && ((dx * dx + dy *dy) > CHILDAGENTSCHECK_MOVEMENT))
if ((m_agentTransfer != null) && (viewchanged || ((dx * dx + dy * dy) > CHILDAGENTSCHECK_MOVEMENT)))
{
m_childUpdatesBusy = true;
m_lastChildAgentCheckPosition = pos;
@ -4445,7 +4447,6 @@ namespace OpenSim.Region.Framework.Scenes
if (m_lastChildAgentUpdateGodLevel != GodController.ViwerUIGodLevel)
doUpdate = true;
bool viewchanged = Math.Abs(DrawDistance - m_lastChildAgentUpdateDrawDistance) > 32.0f;
if (!viewchanged)
doUpdate = true;