diff options
author | Mic Bowman | 2011-04-25 15:11:29 -0700 |
---|---|---|
committer | Mic Bowman | 2011-04-25 15:11:29 -0700 |
commit | 77ab7ce084d32c45273d79e9ec4f52c43e3a1d97 (patch) | |
tree | 112d02864d1a8ff5c60693687dc7600a5fbe9f15 /OpenSim/Region/Framework | |
parent | Merge branch 'master' into queuetest (diff) | |
download | opensim-SC_OLD-77ab7ce084d32c45273d79e9ec4f52c43e3a1d97.zip opensim-SC_OLD-77ab7ce084d32c45273d79e9ec4f52c43e3a1d97.tar.gz opensim-SC_OLD-77ab7ce084d32c45273d79e9ec4f52c43e3a1d97.tar.bz2 opensim-SC_OLD-77ab7ce084d32c45273d79e9ec4f52c43e3a1d97.tar.xz |
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.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 33 |
1 files changed, 15 insertions, 18 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 00a1487..ef0eb89 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -2632,18 +2632,17 @@ namespace OpenSim.Region.Framework.Scenes | |||
2632 | cadu.GroupAccess = 0; | 2632 | cadu.GroupAccess = 0; |
2633 | cadu.Position = AbsolutePosition; | 2633 | cadu.Position = AbsolutePosition; |
2634 | cadu.regionHandle = m_rootRegionHandle; | 2634 | cadu.regionHandle = m_rootRegionHandle; |
2635 | |||
2636 | // Throttles | ||
2635 | float multiplier = 1; | 2637 | float multiplier = 1; |
2636 | int innacurateNeighbors = m_scene.GetInaccurateNeighborCount(); | 2638 | int childRegions = m_knownChildRegions.Count; |
2637 | if (innacurateNeighbors != 0) | 2639 | if (childRegions != 0) |
2638 | { | 2640 | multiplier = 1f / childRegions; |
2639 | multiplier = 1f / (float)innacurateNeighbors; | 2641 | |
2640 | } | 2642 | // Minimum throttle for a child region is 1/4 of the root region throttle |
2641 | if (multiplier <= 0f) | 2643 | if (multiplier <= 0.25f) |
2642 | { | ||
2643 | multiplier = 0.25f; | 2644 | multiplier = 0.25f; |
2644 | } | ||
2645 | 2645 | ||
2646 | //m_log.Info("[NeighborThrottle]: " + m_scene.GetInaccurateNeighborCount().ToString() + " - m: " + multiplier.ToString()); | ||
2647 | cadu.throttles = ControllingClient.GetThrottlesPacked(multiplier); | 2646 | cadu.throttles = ControllingClient.GetThrottlesPacked(multiplier); |
2648 | cadu.Velocity = Velocity; | 2647 | cadu.Velocity = Velocity; |
2649 | 2648 | ||
@@ -3039,16 +3038,14 @@ namespace OpenSim.Region.Framework.Scenes | |||
3039 | 3038 | ||
3040 | // Throttles | 3039 | // Throttles |
3041 | float multiplier = 1; | 3040 | float multiplier = 1; |
3042 | int innacurateNeighbors = m_scene.GetInaccurateNeighborCount(); | 3041 | int childRegions = m_knownChildRegions.Count; |
3043 | if (innacurateNeighbors != 0) | 3042 | if (childRegions != 0) |
3044 | { | 3043 | multiplier = 1f / childRegions; |
3045 | multiplier = 1f / innacurateNeighbors; | 3044 | |
3046 | } | 3045 | // Minimum throttle for a child region is 1/4 of the root region throttle |
3047 | if (multiplier <= 0f) | 3046 | if (multiplier <= 0.25f) |
3048 | { | ||
3049 | multiplier = 0.25f; | 3047 | multiplier = 0.25f; |
3050 | } | 3048 | |
3051 | //m_log.Info("[NeighborThrottle]: " + m_scene.GetInaccurateNeighborCount().ToString() + " - m: " + multiplier.ToString()); | ||
3052 | cAgent.Throttles = ControllingClient.GetThrottlesPacked(multiplier); | 3049 | cAgent.Throttles = ControllingClient.GetThrottlesPacked(multiplier); |
3053 | 3050 | ||
3054 | cAgent.HeadRotation = m_headrotation; | 3051 | cAgent.HeadRotation = m_headrotation; |