mirror of
https://github.com/opensim/opensim.git
synced 2026-08-13 05:05:43 +08:00
Fixed the transmission of throttles from root agent to child
agents. Child throttles are based on the number of child agents known to the root and at least 1/4 of the throttle given to the root.
This commit is contained in:
@@ -2632,18 +2632,17 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
cadu.GroupAccess = 0;
|
||||
cadu.Position = AbsolutePosition;
|
||||
cadu.regionHandle = m_rootRegionHandle;
|
||||
float multiplier = 1;
|
||||
int innacurateNeighbors = m_scene.GetInaccurateNeighborCount();
|
||||
if (innacurateNeighbors != 0)
|
||||
{
|
||||
multiplier = 1f / (float)innacurateNeighbors;
|
||||
}
|
||||
if (multiplier <= 0f)
|
||||
{
|
||||
multiplier = 0.25f;
|
||||
}
|
||||
|
||||
//m_log.Info("[NeighborThrottle]: " + m_scene.GetInaccurateNeighborCount().ToString() + " - m: " + multiplier.ToString());
|
||||
// Throttles
|
||||
float multiplier = 1;
|
||||
int childRegions = m_knownChildRegions.Count;
|
||||
if (childRegions != 0)
|
||||
multiplier = 1f / childRegions;
|
||||
|
||||
// Minimum throttle for a child region is 1/4 of the root region throttle
|
||||
if (multiplier <= 0.25f)
|
||||
multiplier = 0.25f;
|
||||
|
||||
cadu.throttles = ControllingClient.GetThrottlesPacked(multiplier);
|
||||
cadu.Velocity = Velocity;
|
||||
|
||||
@@ -3039,16 +3038,14 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
|
||||
// Throttles
|
||||
float multiplier = 1;
|
||||
int innacurateNeighbors = m_scene.GetInaccurateNeighborCount();
|
||||
if (innacurateNeighbors != 0)
|
||||
{
|
||||
multiplier = 1f / innacurateNeighbors;
|
||||
}
|
||||
if (multiplier <= 0f)
|
||||
{
|
||||
int childRegions = m_knownChildRegions.Count;
|
||||
if (childRegions != 0)
|
||||
multiplier = 1f / childRegions;
|
||||
|
||||
// Minimum throttle for a child region is 1/4 of the root region throttle
|
||||
if (multiplier <= 0.25f)
|
||||
multiplier = 0.25f;
|
||||
}
|
||||
//m_log.Info("[NeighborThrottle]: " + m_scene.GetInaccurateNeighborCount().ToString() + " - m: " + multiplier.ToString());
|
||||
|
||||
cAgent.Throttles = ControllingClient.GetThrottlesPacked(multiplier);
|
||||
|
||||
cAgent.HeadRotation = m_headrotation;
|
||||
|
||||
Reference in New Issue
Block a user