minor: dont let rcvd agentupdates time jump back
parent
05ba77fd3b
commit
e77f913116
|
@ -82,6 +82,7 @@ namespace OpenSim.Framework
|
|||
public Vector3 ClientAgentPosition;
|
||||
public bool UseClientAgentPosition;
|
||||
public bool NeedsCameraCollision;
|
||||
public uint lastpacketSequence;
|
||||
|
||||
public AgentUpdateArgs()
|
||||
{
|
||||
|
|
|
@ -6251,9 +6251,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
return false;
|
||||
}
|
||||
|
||||
uint seq = packet.Header.Sequence;
|
||||
|
||||
TotalAgentUpdates++;
|
||||
// dont let ignored updates pollute this throttles
|
||||
if(SceneAgent == null || SceneAgent.IsChildAgent || SceneAgent.IsInTransit)
|
||||
if(SceneAgent == null || SceneAgent.IsChildAgent ||
|
||||
SceneAgent.IsInTransit || seq <= m_thisAgentUpdateArgs.lastpacketSequence )
|
||||
{
|
||||
// throttle reset is done at MoveAgentIntoRegion()
|
||||
// called by scenepresence on completemovement
|
||||
|
@ -6261,6 +6264,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
return true;
|
||||
}
|
||||
|
||||
m_thisAgentUpdateArgs.lastpacketSequence = seq;
|
||||
|
||||
bool movement = CheckAgentMovementUpdateSignificance(x);
|
||||
bool camera = CheckAgentCameraUpdateSignificance(x);
|
||||
|
||||
|
|
|
@ -2318,7 +2318,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
Vector3 tocam = CameraPosition - posAdjusted;
|
||||
|
||||
float distTocamlen = tocam.LengthSquared();
|
||||
if (distTocamlen > 0.08f && distTocamlen < 400)
|
||||
if (distTocamlen > 0.01f && distTocamlen < 400)
|
||||
{
|
||||
distTocamlen = (float)Math.Sqrt(distTocamlen);
|
||||
tocam *= (1.0f / distTocamlen);
|
||||
|
@ -4378,16 +4378,12 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
m_log.DebugFormat(
|
||||
"[SCENE PRESENCE]: Closing child agents. Checking {0} regions in {1}",
|
||||
knownRegions.Count, Scene.RegionInfo.RegionName);
|
||||
//DumpKnownRegions();
|
||||
|
||||
Util.RegionHandleToRegionLoc(newRegionHandle, out newRegionX, out newRegionY);
|
||||
|
||||
uint x, y;
|
||||
spRegionSizeInfo regInfo;
|
||||
|
||||
// this should not be here
|
||||
IEventQueue eventQueue = Scene.RequestModuleInterface<IEventQueue>();
|
||||
|
||||
foreach (ulong handle in knownRegions)
|
||||
{
|
||||
// Don't close the agent on this region yet
|
||||
|
@ -4400,16 +4396,10 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
Util.RegionHandleToRegionLoc(handle, out x, out y);
|
||||
if (m_knownChildRegionsSizeInfo.TryGetValue(handle, out regInfo))
|
||||
{
|
||||
|
||||
// m_log.Debug("---> x: " + x + "; newx:" + newRegionX + "; Abs:" + (int)Math.Abs((int)(x - newRegionX)));
|
||||
// m_log.Debug("---> y: " + y + "; newy:" + newRegionY + "; Abs:" + (int)Math.Abs((int)(y - newRegionY)));
|
||||
if (Util.IsOutsideView(RegionViewDistance, x, newRegionX, y, newRegionY,
|
||||
regInfo.sizeX, regInfo.sizeY, newRegionSizeX, newRegionSizeY))
|
||||
{
|
||||
byebyeRegions.Add(handle);
|
||||
// this should not be here
|
||||
// if(eventQueue != null)
|
||||
/// eventQueue.DisableSimulator(handle,UUID);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -4445,6 +4435,32 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
}
|
||||
}
|
||||
|
||||
public void closeAllChildAgents()
|
||||
{
|
||||
List<ulong> byebyeRegions = new List<ulong>();
|
||||
List<ulong> knownRegions = KnownRegionHandles;
|
||||
foreach (ulong handle in knownRegions)
|
||||
{
|
||||
if (handle != Scene.RegionInfo.RegionHandle)
|
||||
{
|
||||
byebyeRegions.Add(handle);
|
||||
RemoveNeighbourRegion(handle);
|
||||
Scene.CapsModule.DropChildSeed(UUID, handle);
|
||||
}
|
||||
}
|
||||
|
||||
if (byebyeRegions.Count > 0)
|
||||
{
|
||||
m_log.Debug("[SCENE PRESENCE]: Closing " + byebyeRegions.Count + " child agents");
|
||||
|
||||
AgentCircuitData acd = Scene.AuthenticateHandler.GetAgentCircuitData(UUID);
|
||||
string auth = string.Empty;
|
||||
if (acd != null)
|
||||
auth = acd.SessionID.ToString();
|
||||
m_scene.SceneGridService.SendCloseChildAgentConnections(ControllingClient.AgentId, auth, byebyeRegions);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
|
|
Loading…
Reference in New Issue