From b263587e2104f304f084c72fcb0cc1d155dacc1e Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sun, 13 Jan 2013 15:25:51 +0000 Subject: [PATCH] try to patch getmesh Throttle (test) --- .../Region/ClientStack/Linden/Caps/GetMeshModule.cs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/OpenSim/Region/ClientStack/Linden/Caps/GetMeshModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/GetMeshModule.cs index 908f628274..6ec111539c 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/GetMeshModule.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/GetMeshModule.cs @@ -501,7 +501,8 @@ namespace OpenSim.Region.ClientStack.Linden ScenePresence p; if (m_scene.TryGetScenePresence(User, out p)) // If we don't get a user they're not here anymore. { - AlterThrottle(UserSetThrottle, p); +// AlterThrottle(UserSetThrottle, p); + UpdateThrottle(UserSetThrottle, p); } } } @@ -546,7 +547,12 @@ namespace OpenSim.Region.ClientStack.Linden // Client set throttle ! UserSetThrottle = pimagethrottle; CapSetThrottle = (int)(pimagethrottle*CapThrottleDistributon); - UDPSetThrottle = (int) (pimagethrottle*(100 - CapThrottleDistributon)); +// UDPSetThrottle = (int) (pimagethrottle*(100 - CapThrottleDistributon)); + + float udp = 1.0f - CapThrottleDistributon; + if(udp < 0.5f) + udp = 0.5f; + UDPSetThrottle = (int) ((float)pimagethrottle * udp); if (CapSetThrottle < 4068) CapSetThrottle = 4068; // at least two discovery mesh p.ControllingClient.SetAgentThrottleSilent((int) Throttle, UDPSetThrottle);