mirror of
https://github.com/opensim/opensim.git
synced 2026-08-11 20:05:33 +08:00
change visible regions also by view range change; fix check on crossings
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user