aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/ClientStack/PacketQueue.cs22
1 files changed, 22 insertions, 0 deletions
diff --git a/OpenSim/Region/ClientStack/PacketQueue.cs b/OpenSim/Region/ClientStack/PacketQueue.cs
index ca878bb..51e8b72 100644
--- a/OpenSim/Region/ClientStack/PacketQueue.cs
+++ b/OpenSim/Region/ClientStack/PacketQueue.cs
@@ -329,7 +329,29 @@ namespace OpenSim.Region.ClientStack
329 { 329 {
330 return (int)(((float)value/(float)curmax) * newmax); 330 return (int)(((float)value/(float)curmax) * newmax);
331 } 331 }
332 private byte[] GetThrottlesPacked(float multiplier)
333 {
334 int singlefloat = 4;
335 float tResend = ResendThrottle.Throttle * multiplier;
336 float tLand = LandThrottle.Throttle * multiplier;
337 float tWind = WindThrottle.Throttle * multiplier;
338 float tCloud = CloudThrottle.Throttle * multiplier;
339 float tTask = TaskThrottle.Throttle * multiplier;
340 float tTexture = TextureThrottle.Throttle * multiplier;
341 float tAsset = AssetThrottle.Throttle * multiplier;
332 342
343 byte[] throttles = new byte[singlefloat * 7];
344 int i = 0;
345 Buffer.BlockCopy(BitConverter.GetBytes(tResend), 0, throttles, singlefloat * i, singlefloat); i++;
346 Buffer.BlockCopy(BitConverter.GetBytes(tLand), 0, throttles, singlefloat * i, singlefloat); i++;
347 Buffer.BlockCopy(BitConverter.GetBytes(tWind), 0, throttles, singlefloat * i, singlefloat); i++;
348 Buffer.BlockCopy(BitConverter.GetBytes(tCloud), 0, throttles, singlefloat * i, singlefloat); i++;
349 Buffer.BlockCopy(BitConverter.GetBytes(tTask), 0, throttles, singlefloat * i, singlefloat); i++;
350 Buffer.BlockCopy(BitConverter.GetBytes(tTexture), 0, throttles, singlefloat * i, singlefloat); i++;
351 Buffer.BlockCopy(BitConverter.GetBytes(tAsset), 0, throttles, singlefloat * i, singlefloat);
352
353 return throttles;
354 }
333 public void SetThrottleFromClient(byte[] throttle) 355 public void SetThrottleFromClient(byte[] throttle)
334 { 356 {
335 int tResend = -1; 357 int tResend = -1;