diff options
author | Melanie | 2009-08-19 04:40:57 +0100 |
---|---|---|
committer | Melanie | 2009-08-19 04:40:57 +0100 |
commit | c5bbcb04e039fc6261aca26b6ee73cf1d9cbe618 (patch) | |
tree | da00f86b36dd18a9713d59ddf97587c238ecf823 /OpenSim | |
parent | Add rest console support to the user server. Will ask new questions at (diff) | |
parent | osGetLinkPrimitiveParams fix (diff) | |
download | opensim-SC-c5bbcb04e039fc6261aca26b6ee73cf1d9cbe618.zip opensim-SC-c5bbcb04e039fc6261aca26b6ee73cf1d9cbe618.tar.gz opensim-SC-c5bbcb04e039fc6261aca26b6ee73cf1d9cbe618.tar.bz2 opensim-SC-c5bbcb04e039fc6261aca26b6ee73cf1d9cbe618.tar.xz |
Merge branch 'master' of ssh://melanie@opensimulator.org/var/git/opensim
Diffstat (limited to 'OpenSim')
3 files changed, 56 insertions, 17 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs b/OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs index bf0b06d..798c1e7 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs | |||
@@ -128,28 +128,36 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
128 | // Store the throttle multiplier for posterity. | 128 | // Store the throttle multiplier for posterity. |
129 | throttleMultiplier = userSettings.ClientThrottleMultipler; | 129 | throttleMultiplier = userSettings.ClientThrottleMultipler; |
130 | 130 | ||
131 | |||
132 | int throttleMaxBPS = 1500000; | ||
133 | if (userSettings.TotalThrottleSettings != null) | ||
134 | throttleMaxBPS = userSettings.TotalThrottleSettings.Max; | ||
135 | |||
131 | // Set up the throttle classes (min, max, current) in bits per second | 136 | // Set up the throttle classes (min, max, current) in bits per second |
132 | ResendThrottle = new LLPacketThrottle(5000, 100000, 16000, userSettings.ClientThrottleMultipler); | 137 | ResendThrottle = new LLPacketThrottle(5000, throttleMaxBPS / 15, 16000, userSettings.ClientThrottleMultipler); |
133 | LandThrottle = new LLPacketThrottle(1000, 100000, 2000, userSettings.ClientThrottleMultipler); | 138 | LandThrottle = new LLPacketThrottle(1000, throttleMaxBPS / 15, 2000, userSettings.ClientThrottleMultipler); |
134 | WindThrottle = new LLPacketThrottle(0, 100000, 0, userSettings.ClientThrottleMultipler); | 139 | WindThrottle = new LLPacketThrottle(0, throttleMaxBPS / 15, 0, userSettings.ClientThrottleMultipler); |
135 | CloudThrottle = new LLPacketThrottle(0, 100000, 0, userSettings.ClientThrottleMultipler); | 140 | CloudThrottle = new LLPacketThrottle(0, throttleMaxBPS / 15, 0, userSettings.ClientThrottleMultipler); |
136 | TaskThrottle = new LLPacketThrottle(1000, 800000, 3000, userSettings.ClientThrottleMultipler); | 141 | TaskThrottle = new LLPacketThrottle(1000, throttleMaxBPS / 2, 3000, userSettings.ClientThrottleMultipler); |
137 | AssetThrottle = new LLPacketThrottle(1000, 800000, 1000, userSettings.ClientThrottleMultipler); | 142 | AssetThrottle = new LLPacketThrottle(1000, throttleMaxBPS / 2, 1000, userSettings.ClientThrottleMultipler); |
138 | TextureThrottle = new LLPacketThrottle(1000, 800000, 4000, userSettings.ClientThrottleMultipler); | 143 | TextureThrottle = new LLPacketThrottle(1000, throttleMaxBPS / 2, 4000, userSettings.ClientThrottleMultipler); |
139 | 144 | ||
140 | // Total Throttle trumps all - it is the number of bits in total that are allowed to go out per second. | 145 | |
146 | // Total Throttle trumps all - it is the number of bits in total that are allowed to go out per second. | ||
147 | |||
148 | |||
141 | ThrottleSettings totalThrottleSettings = userSettings.TotalThrottleSettings; | 149 | ThrottleSettings totalThrottleSettings = userSettings.TotalThrottleSettings; |
142 | if (null == totalThrottleSettings) | 150 | if (null == totalThrottleSettings) |
143 | { | 151 | { |
144 | totalThrottleSettings = new ThrottleSettings(0, 1500000, 28000); | 152 | totalThrottleSettings = new ThrottleSettings(0, throttleMaxBPS, 28000); |
145 | } | 153 | } |
146 | 154 | ||
147 | TotalThrottle | 155 | TotalThrottle |
148 | = new LLPacketThrottle( | 156 | = new LLPacketThrottle( |
149 | totalThrottleSettings.Min, totalThrottleSettings.Max, totalThrottleSettings.Current, | 157 | totalThrottleSettings.Min, totalThrottleSettings.Max, totalThrottleSettings.Current, |
150 | userSettings.ClientThrottleMultipler); | 158 | userSettings.ClientThrottleMultipler); |
151 | 159 | ||
152 | throttleTimer = new Timer((int) (throttletimems/throttleTimeDivisor)); | 160 | throttleTimer = new Timer((int)(throttletimems / throttleTimeDivisor)); |
153 | throttleTimer.Elapsed += ThrottleTimerElapsed; | 161 | throttleTimer.Elapsed += ThrottleTimerElapsed; |
154 | throttleTimer.Start(); | 162 | throttleTimer.Start(); |
155 | 163 | ||
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs index 5184e35..9ee8df5 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs | |||
@@ -152,11 +152,18 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
152 | ClientStackUserSettings userSettings = new ClientStackUserSettings(); | 152 | ClientStackUserSettings userSettings = new ClientStackUserSettings(); |
153 | 153 | ||
154 | IConfig config = configSource.Configs["ClientStack.LindenUDP"]; | 154 | IConfig config = configSource.Configs["ClientStack.LindenUDP"]; |
155 | 155 | ||
156 | if (config != null) | 156 | if (config != null) |
157 | { | 157 | { |
158 | if (config.Contains("client_throttle_max_bps")) | ||
159 | { | ||
160 | int maxBPS = config.GetInt("client_throttle_max_bps", 1500000); | ||
161 | userSettings.TotalThrottleSettings = new ThrottleSettings(0, maxBPS, | ||
162 | maxBPS > 28000 ? maxBPS : 28000); | ||
163 | } | ||
164 | |||
158 | if (config.Contains("client_throttle_multiplier")) | 165 | if (config.Contains("client_throttle_multiplier")) |
159 | userSettings.ClientThrottleMultipler = config.GetFloat("client_throttle_multiplier"); | 166 | userSettings.ClientThrottleMultipler = config.GetFloat("client_throttle_multiplier"); |
160 | if (config.Contains("client_socket_rcvbuf_size")) | 167 | if (config.Contains("client_socket_rcvbuf_size")) |
161 | m_clientSocketReceiveBuffer = config.GetInt("client_socket_rcvbuf_size"); | 168 | m_clientSocketReceiveBuffer = config.GetInt("client_socket_rcvbuf_size"); |
162 | } | 169 | } |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 2dbbf70..4e665e9 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -1978,6 +1978,30 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1978 | return new LSL_Rotation(q.X, q.Y, q.Z, q.W); | 1978 | return new LSL_Rotation(q.X, q.Y, q.Z, q.W); |
1979 | } | 1979 | } |
1980 | 1980 | ||
1981 | private LSL_Rotation GetPartRot( SceneObjectPart part ) | ||
1982 | { | ||
1983 | Quaternion q; | ||
1984 | if (part.LinkNum == 0 || part.LinkNum == 1) // unlinked or root prim | ||
1985 | { | ||
1986 | if (part.ParentGroup.RootPart.AttachmentPoint != 0) | ||
1987 | { | ||
1988 | ScenePresence avatar = World.GetScenePresence(part.AttachedAvatar); | ||
1989 | if (avatar != null) | ||
1990 | if ((avatar.AgentControlFlags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_MOUSELOOK) != 0) | ||
1991 | q = avatar.CameraRotation; // Mouselook | ||
1992 | else | ||
1993 | q = avatar.Rotation; // Currently infrequently updated so may be inaccurate | ||
1994 | else | ||
1995 | q = part.ParentGroup.GroupRotation; // Likely never get here but just in case | ||
1996 | } | ||
1997 | else | ||
1998 | q = part.ParentGroup.GroupRotation; // just the group rotation | ||
1999 | return new LSL_Rotation(q.X, q.Y, q.Z, q.W); | ||
2000 | } | ||
2001 | q = part.GetWorldRotation(); | ||
2002 | return new LSL_Rotation(q.X, q.Y, q.Z, q.W); | ||
2003 | } | ||
2004 | |||
1981 | public LSL_Rotation llGetLocalRot() | 2005 | public LSL_Rotation llGetLocalRot() |
1982 | { | 2006 | { |
1983 | m_host.AddScriptLPS(1); | 2007 | m_host.AddScriptLPS(1); |
@@ -7299,7 +7323,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
7299 | break; | 7323 | break; |
7300 | 7324 | ||
7301 | case (int)ScriptBaseClass.PRIM_ROTATION: | 7325 | case (int)ScriptBaseClass.PRIM_ROTATION: |
7302 | res.Add(llGetRot()); | 7326 | res.Add(GetPartRot(part)); |
7303 | break; | 7327 | break; |
7304 | 7328 | ||
7305 | case (int)ScriptBaseClass.PRIM_TYPE: | 7329 | case (int)ScriptBaseClass.PRIM_TYPE: |