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,12 +1785,15 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
cAgent.Position = pos; cAgent.Position = pos;
cAgent.ChildrenCapSeeds = agent.KnownRegions; cAgent.ChildrenCapSeeds = agent.KnownRegions;
if(ctx.OutboundVersion < 0.7f)
{
childRegionsToClose = agent.GetChildAgentsToClose(neighbourRegion.RegionHandle, neighbourRegion.RegionSizeX, neighbourRegion.RegionSizeY); childRegionsToClose = agent.GetChildAgentsToClose(neighbourRegion.RegionHandle, neighbourRegion.RegionSizeX, neighbourRegion.RegionSizeY);
if(cAgent.ChildrenCapSeeds != null) if(cAgent.ChildrenCapSeeds != null)
{ {
foreach(ulong regh in childRegionsToClose) foreach(ulong regh in childRegionsToClose)
cAgent.ChildrenCapSeeds.Remove(regh); cAgent.ChildrenCapSeeds.Remove(regh);
} }
}
if (isFlying) if (isFlying)
cAgent.ControlFlags |= (uint)AgentManager.ControlFlags.AGENT_CONTROL_FLY; cAgent.ControlFlags |= (uint)AgentManager.ControlFlags.AGENT_CONTROL_FLY;

View File

@ -4415,10 +4415,12 @@ namespace OpenSim.Region.Framework.Scenes
if (tdiff < CHILDUPDATES_TIME) if (tdiff < CHILDUPDATES_TIME)
return; return;
bool viewchanged = Math.Abs(DrawDistance - m_lastChildAgentUpdateDrawDistance) > 32.0f;
IEntityTransferModule m_agentTransfer = m_scene.RequestModuleInterface<IEntityTransferModule>(); 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; 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_childUpdatesBusy = true;
m_lastChildAgentCheckPosition = pos; m_lastChildAgentCheckPosition = pos;
@ -4445,7 +4447,6 @@ namespace OpenSim.Region.Framework.Scenes
if (m_lastChildAgentUpdateGodLevel != GodController.ViwerUIGodLevel) if (m_lastChildAgentUpdateGodLevel != GodController.ViwerUIGodLevel)
doUpdate = true; doUpdate = true;
bool viewchanged = Math.Abs(DrawDistance - m_lastChildAgentUpdateDrawDistance) > 32.0f;
if (!viewchanged) if (!viewchanged)
doUpdate = true; doUpdate = true;