aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework/Scenes')
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs19
1 files changed, 18 insertions, 1 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index 6a9e0ca..3b64088 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -4104,7 +4104,24 @@ namespace OpenSim.Region.Framework.Scenes
4104 CameraPosition = cAgentData.Center + offset; 4104 CameraPosition = cAgentData.Center + offset;
4105 4105
4106 if ((cAgentData.Throttles != null) && cAgentData.Throttles.Length > 0) 4106 if ((cAgentData.Throttles != null) && cAgentData.Throttles.Length > 0)
4107 ControllingClient.SetChildAgentThrottle(cAgentData.Throttles); 4107 {
4108 // some scaling factor
4109 float x = m_pos.X;
4110 if (x > m_scene.RegionInfo.RegionSizeX)
4111 x -= m_scene.RegionInfo.RegionSizeX;
4112 float y = m_pos.Y;
4113 if (y > m_scene.RegionInfo.RegionSizeY)
4114 y -= m_scene.RegionInfo.RegionSizeY;
4115
4116 x = x * x + y * y;
4117
4118 const float distScale = 0.4f / Constants.RegionSize / Constants.RegionSize;
4119 float factor = 1.0f - distScale * x;
4120 if (factor < 0.2f)
4121 factor = 0.2f;
4122
4123 ControllingClient.SetChildAgentThrottle(cAgentData.Throttles,factor);
4124 }
4108 4125
4109 if(cAgentData.ChildrenCapSeeds != null && cAgentData.ChildrenCapSeeds.Count >0) 4126 if(cAgentData.ChildrenCapSeeds != null && cAgentData.ChildrenCapSeeds.Count >0)
4110 { 4127 {