Merge branch 'master' of ssh://melanie@opensimulator.org/var/git/opensim
commit
c5bbcb04e0
|
@ -128,20 +128,28 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
// Store the throttle multiplier for posterity.
|
// Store the throttle multiplier for posterity.
|
||||||
throttleMultiplier = userSettings.ClientThrottleMultipler;
|
throttleMultiplier = userSettings.ClientThrottleMultipler;
|
||||||
|
|
||||||
|
|
||||||
|
int throttleMaxBPS = 1500000;
|
||||||
|
if (userSettings.TotalThrottleSettings != null)
|
||||||
|
throttleMaxBPS = userSettings.TotalThrottleSettings.Max;
|
||||||
|
|
||||||
// Set up the throttle classes (min, max, current) in bits per second
|
// Set up the throttle classes (min, max, current) in bits per second
|
||||||
ResendThrottle = new LLPacketThrottle(5000, 100000, 16000, userSettings.ClientThrottleMultipler);
|
ResendThrottle = new LLPacketThrottle(5000, throttleMaxBPS / 15, 16000, userSettings.ClientThrottleMultipler);
|
||||||
LandThrottle = new LLPacketThrottle(1000, 100000, 2000, userSettings.ClientThrottleMultipler);
|
LandThrottle = new LLPacketThrottle(1000, throttleMaxBPS / 15, 2000, userSettings.ClientThrottleMultipler);
|
||||||
WindThrottle = new LLPacketThrottle(0, 100000, 0, userSettings.ClientThrottleMultipler);
|
WindThrottle = new LLPacketThrottle(0, throttleMaxBPS / 15, 0, userSettings.ClientThrottleMultipler);
|
||||||
CloudThrottle = new LLPacketThrottle(0, 100000, 0, userSettings.ClientThrottleMultipler);
|
CloudThrottle = new LLPacketThrottle(0, throttleMaxBPS / 15, 0, userSettings.ClientThrottleMultipler);
|
||||||
TaskThrottle = new LLPacketThrottle(1000, 800000, 3000, userSettings.ClientThrottleMultipler);
|
TaskThrottle = new LLPacketThrottle(1000, throttleMaxBPS / 2, 3000, userSettings.ClientThrottleMultipler);
|
||||||
AssetThrottle = new LLPacketThrottle(1000, 800000, 1000, userSettings.ClientThrottleMultipler);
|
AssetThrottle = new LLPacketThrottle(1000, throttleMaxBPS / 2, 1000, userSettings.ClientThrottleMultipler);
|
||||||
TextureThrottle = new LLPacketThrottle(1000, 800000, 4000, userSettings.ClientThrottleMultipler);
|
TextureThrottle = new LLPacketThrottle(1000, throttleMaxBPS / 2, 4000, userSettings.ClientThrottleMultipler);
|
||||||
|
|
||||||
|
|
||||||
// Total Throttle trumps all - it is the number of bits in total that are allowed to go out per second.
|
// Total Throttle trumps all - it is the number of bits in total that are allowed to go out per second.
|
||||||
|
|
||||||
|
|
||||||
ThrottleSettings totalThrottleSettings = userSettings.TotalThrottleSettings;
|
ThrottleSettings totalThrottleSettings = userSettings.TotalThrottleSettings;
|
||||||
if (null == totalThrottleSettings)
|
if (null == totalThrottleSettings)
|
||||||
{
|
{
|
||||||
totalThrottleSettings = new ThrottleSettings(0, 1500000, 28000);
|
totalThrottleSettings = new ThrottleSettings(0, throttleMaxBPS, 28000);
|
||||||
}
|
}
|
||||||
|
|
||||||
TotalThrottle
|
TotalThrottle
|
||||||
|
|
|
@ -155,6 +155,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
|
|
||||||
if (config != null)
|
if (config != null)
|
||||||
{
|
{
|
||||||
|
if (config.Contains("client_throttle_max_bps"))
|
||||||
|
{
|
||||||
|
int maxBPS = config.GetInt("client_throttle_max_bps", 1500000);
|
||||||
|
userSettings.TotalThrottleSettings = new ThrottleSettings(0, maxBPS,
|
||||||
|
maxBPS > 28000 ? maxBPS : 28000);
|
||||||
|
}
|
||||||
|
|
||||||
if (config.Contains("client_throttle_multiplier"))
|
if (config.Contains("client_throttle_multiplier"))
|
||||||
userSettings.ClientThrottleMultipler = config.GetFloat("client_throttle_multiplier");
|
userSettings.ClientThrottleMultipler = config.GetFloat("client_throttle_multiplier");
|
||||||
if (config.Contains("client_socket_rcvbuf_size"))
|
if (config.Contains("client_socket_rcvbuf_size"))
|
||||||
|
|
|
@ -1978,6 +1978,30 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
return new LSL_Rotation(q.X, q.Y, q.Z, q.W);
|
return new LSL_Rotation(q.X, q.Y, q.Z, q.W);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private LSL_Rotation GetPartRot( SceneObjectPart part )
|
||||||
|
{
|
||||||
|
Quaternion q;
|
||||||
|
if (part.LinkNum == 0 || part.LinkNum == 1) // unlinked or root prim
|
||||||
|
{
|
||||||
|
if (part.ParentGroup.RootPart.AttachmentPoint != 0)
|
||||||
|
{
|
||||||
|
ScenePresence avatar = World.GetScenePresence(part.AttachedAvatar);
|
||||||
|
if (avatar != null)
|
||||||
|
if ((avatar.AgentControlFlags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_MOUSELOOK) != 0)
|
||||||
|
q = avatar.CameraRotation; // Mouselook
|
||||||
|
else
|
||||||
|
q = avatar.Rotation; // Currently infrequently updated so may be inaccurate
|
||||||
|
else
|
||||||
|
q = part.ParentGroup.GroupRotation; // Likely never get here but just in case
|
||||||
|
}
|
||||||
|
else
|
||||||
|
q = part.ParentGroup.GroupRotation; // just the group rotation
|
||||||
|
return new LSL_Rotation(q.X, q.Y, q.Z, q.W);
|
||||||
|
}
|
||||||
|
q = part.GetWorldRotation();
|
||||||
|
return new LSL_Rotation(q.X, q.Y, q.Z, q.W);
|
||||||
|
}
|
||||||
|
|
||||||
public LSL_Rotation llGetLocalRot()
|
public LSL_Rotation llGetLocalRot()
|
||||||
{
|
{
|
||||||
m_host.AddScriptLPS(1);
|
m_host.AddScriptLPS(1);
|
||||||
|
@ -7299,7 +7323,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case (int)ScriptBaseClass.PRIM_ROTATION:
|
case (int)ScriptBaseClass.PRIM_ROTATION:
|
||||||
res.Add(llGetRot());
|
res.Add(GetPartRot(part));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case (int)ScriptBaseClass.PRIM_TYPE:
|
case (int)ScriptBaseClass.PRIM_TYPE:
|
||||||
|
|
|
@ -374,6 +374,9 @@
|
||||||
;
|
;
|
||||||
; client_socket_rcvbuf_size = 8388608
|
; client_socket_rcvbuf_size = 8388608
|
||||||
|
|
||||||
|
; Maximum bits per second to send to any single client. This will override the user's viewer preference settings.
|
||||||
|
|
||||||
|
; client_throttle_max_bps = 1500000
|
||||||
|
|
||||||
[Chat]
|
[Chat]
|
||||||
; Controls whether the chat module is enabled. Default is true.
|
; Controls whether the chat module is enabled. Default is true.
|
||||||
|
|
Loading…
Reference in New Issue