aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack/Linden/UDP/LLUDPClient.cs
diff options
context:
space:
mode:
authorUbitUmarov2014-11-06 22:25:16 +0000
committerUbitUmarov2014-11-06 22:25:16 +0000
commitcaddabb5c4f62767305a589e9d818ae3457a8030 (patch)
tree89d3c6715ec83d1ce8358674b48227c9d77ee2e3 /OpenSim/Region/ClientStack/Linden/UDP/LLUDPClient.cs
parent allow drawdistance to change between 32 and MaxDrawDistance, configurable (diff)
downloadopensim-SC-caddabb5c4f62767305a589e9d818ae3457a8030.zip
opensim-SC-caddabb5c4f62767305a589e9d818ae3457a8030.tar.gz
opensim-SC-caddabb5c4f62767305a589e9d818ae3457a8030.tar.bz2
opensim-SC-caddabb5c4f62767305a589e9d818ae3457a8030.tar.xz
scale ChildAgentThrottles with distance (internal to child server and not
root as was done before )
Diffstat (limited to 'OpenSim/Region/ClientStack/Linden/UDP/LLUDPClient.cs')
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/LLUDPClient.cs20
1 files changed, 13 insertions, 7 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPClient.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPClient.cs
index 33375ff..0ae7617 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPClient.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPClient.cs
@@ -340,6 +340,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP
340 340
341 public void SetThrottles(byte[] throttleData) 341 public void SetThrottles(byte[] throttleData)
342 { 342 {
343 SetThrottles(throttleData, 1.0f);
344 }
345
346 public void SetThrottles(byte[] throttleData, float factor)
347 {
343 byte[] adjData; 348 byte[] adjData;
344 int pos = 0; 349 int pos = 0;
345 350
@@ -359,13 +364,14 @@ namespace OpenSim.Region.ClientStack.LindenUDP
359 } 364 }
360 365
361 // 0.125f converts from bits to bytes 366 // 0.125f converts from bits to bytes
362 int resend = (int)(BitConverter.ToSingle(adjData, pos) * 0.125f); pos += 4; 367 float scale = 0.125f * factor;
363 int land = (int)(BitConverter.ToSingle(adjData, pos) * 0.125f); pos += 4; 368 int resend = (int)(BitConverter.ToSingle(adjData, pos) * scale); pos += 4;
364 int wind = (int)(BitConverter.ToSingle(adjData, pos) * 0.125f); pos += 4; 369 int land = (int)(BitConverter.ToSingle(adjData, pos) * scale); pos += 4;
365 int cloud = (int)(BitConverter.ToSingle(adjData, pos) * 0.125f); pos += 4; 370 int wind = (int)(BitConverter.ToSingle(adjData, pos) * scale); pos += 4;
366 int task = (int)(BitConverter.ToSingle(adjData, pos) * 0.125f); pos += 4; 371 int cloud = (int)(BitConverter.ToSingle(adjData, pos) * scale); pos += 4;
367 int texture = (int)(BitConverter.ToSingle(adjData, pos) * 0.125f); pos += 4; 372 int task = (int)(BitConverter.ToSingle(adjData, pos) * scale); pos += 4;
368 int asset = (int)(BitConverter.ToSingle(adjData, pos) * 0.125f); 373 int texture = (int)(BitConverter.ToSingle(adjData, pos) * scale); pos += 4;
374 int asset = (int)(BitConverter.ToSingle(adjData, pos) * scale);
369 375
370 // Make sure none of the throttles are set below our packet MTU, 376 // Make sure none of the throttles are set below our packet MTU,
371 // otherwise a throttle could become permanently clogged 377 // otherwise a throttle could become permanently clogged