Merge branch 'master' of ssh://diva@opensimulator.org/var/git/opensim
commit
6aed4323a3
|
@ -144,6 +144,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
/// <summary>A reference to the LLUDPServer that is managing this client</summary>
|
/// <summary>A reference to the LLUDPServer that is managing this client</summary>
|
||||||
private readonly LLUDPServer m_udpServer;
|
private readonly LLUDPServer m_udpServer;
|
||||||
|
|
||||||
|
/// <summary>Caches packed throttle information</summary>
|
||||||
|
private byte[] m_packedThrottles;
|
||||||
|
|
||||||
private int m_defaultRTO = 3000;
|
private int m_defaultRTO = 3000;
|
||||||
private int m_maxRTO = 60000;
|
private int m_maxRTO = 60000;
|
||||||
|
|
||||||
|
@ -350,21 +353,31 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
bucket = m_throttleCategories[(int)ThrottleOutPacketType.Texture];
|
bucket = m_throttleCategories[(int)ThrottleOutPacketType.Texture];
|
||||||
bucket.DripRate = texture;
|
bucket.DripRate = texture;
|
||||||
bucket.MaxBurst = texture;
|
bucket.MaxBurst = texture;
|
||||||
|
|
||||||
|
// Reset the packed throttles cached data
|
||||||
|
m_packedThrottles = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public byte[] GetThrottlesPacked()
|
public byte[] GetThrottlesPacked()
|
||||||
{
|
{
|
||||||
byte[] data = new byte[7 * 4];
|
byte[] data = m_packedThrottles;
|
||||||
int i = 0;
|
|
||||||
|
|
||||||
Buffer.BlockCopy(Utils.FloatToBytes((float)m_throttleCategories[(int)ThrottleOutPacketType.Resend].DripRate), 0, data, i, 4); i += 4;
|
if (data == null)
|
||||||
Buffer.BlockCopy(Utils.FloatToBytes((float)m_throttleCategories[(int)ThrottleOutPacketType.Land].DripRate), 0, data, i, 4); i += 4;
|
{
|
||||||
Buffer.BlockCopy(Utils.FloatToBytes((float)m_throttleCategories[(int)ThrottleOutPacketType.Wind].DripRate), 0, data, i, 4); i += 4;
|
data = new byte[7 * 4];
|
||||||
Buffer.BlockCopy(Utils.FloatToBytes((float)m_throttleCategories[(int)ThrottleOutPacketType.Cloud].DripRate), 0, data, i, 4); i += 4;
|
int i = 0;
|
||||||
Buffer.BlockCopy(Utils.FloatToBytes((float)(m_throttleCategories[(int)ThrottleOutPacketType.Task].DripRate) +
|
|
||||||
m_throttleCategories[(int)ThrottleOutPacketType.State].DripRate), 0, data, i, 4); i += 4;
|
Buffer.BlockCopy(Utils.FloatToBytes((float)m_throttleCategories[(int)ThrottleOutPacketType.Resend].DripRate), 0, data, i, 4); i += 4;
|
||||||
Buffer.BlockCopy(Utils.FloatToBytes((float)m_throttleCategories[(int)ThrottleOutPacketType.Texture].DripRate), 0, data, i, 4); i += 4;
|
Buffer.BlockCopy(Utils.FloatToBytes((float)m_throttleCategories[(int)ThrottleOutPacketType.Land].DripRate), 0, data, i, 4); i += 4;
|
||||||
Buffer.BlockCopy(Utils.FloatToBytes((float)m_throttleCategories[(int)ThrottleOutPacketType.Asset].DripRate), 0, data, i, 4); i += 4;
|
Buffer.BlockCopy(Utils.FloatToBytes((float)m_throttleCategories[(int)ThrottleOutPacketType.Wind].DripRate), 0, data, i, 4); i += 4;
|
||||||
|
Buffer.BlockCopy(Utils.FloatToBytes((float)m_throttleCategories[(int)ThrottleOutPacketType.Cloud].DripRate), 0, data, i, 4); i += 4;
|
||||||
|
Buffer.BlockCopy(Utils.FloatToBytes((float)(m_throttleCategories[(int)ThrottleOutPacketType.Task].DripRate) +
|
||||||
|
m_throttleCategories[(int)ThrottleOutPacketType.State].DripRate), 0, data, i, 4); i += 4;
|
||||||
|
Buffer.BlockCopy(Utils.FloatToBytes((float)m_throttleCategories[(int)ThrottleOutPacketType.Texture].DripRate), 0, data, i, 4); i += 4;
|
||||||
|
Buffer.BlockCopy(Utils.FloatToBytes((float)m_throttleCategories[(int)ThrottleOutPacketType.Asset].DripRate), 0, data, i, 4); i += 4;
|
||||||
|
|
||||||
|
m_packedThrottles = data;
|
||||||
|
}
|
||||||
|
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1133,10 +1133,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
public int GetInaccurateNeighborCount()
|
public int GetInaccurateNeighborCount()
|
||||||
{
|
{
|
||||||
lock (m_neighbours)
|
return m_neighbours.Count;
|
||||||
{
|
|
||||||
return m_neighbours.Count;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// This is the method that shuts down the scene.
|
// This is the method that shuts down the scene.
|
||||||
|
|
|
@ -2675,6 +2675,9 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
if (Util.GetDistanceTo(AbsolutePosition, m_lastChildAgentUpdatePosition) >= Scene.ChildReprioritizationDistance ||
|
if (Util.GetDistanceTo(AbsolutePosition, m_lastChildAgentUpdatePosition) >= Scene.ChildReprioritizationDistance ||
|
||||||
Util.GetDistanceTo(CameraPosition, m_lastChildAgentUpdateCamPosition) >= Scene.ChildReprioritizationDistance)
|
Util.GetDistanceTo(CameraPosition, m_lastChildAgentUpdateCamPosition) >= Scene.ChildReprioritizationDistance)
|
||||||
{
|
{
|
||||||
|
m_lastChildAgentUpdatePosition = AbsolutePosition;
|
||||||
|
m_lastChildAgentUpdateCamPosition = CameraPosition;
|
||||||
|
|
||||||
ChildAgentDataUpdate cadu = new ChildAgentDataUpdate();
|
ChildAgentDataUpdate cadu = new ChildAgentDataUpdate();
|
||||||
cadu.ActiveGroupID = UUID.Zero.Guid;
|
cadu.ActiveGroupID = UUID.Zero.Guid;
|
||||||
cadu.AgentID = UUID.Guid;
|
cadu.AgentID = UUID.Guid;
|
||||||
|
@ -2683,8 +2686,6 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
Vector3 tempCameraCenter = m_CameraCenter;
|
Vector3 tempCameraCenter = m_CameraCenter;
|
||||||
cadu.cameraPosition = tempCameraCenter;
|
cadu.cameraPosition = tempCameraCenter;
|
||||||
cadu.drawdistance = m_DrawDistance;
|
cadu.drawdistance = m_DrawDistance;
|
||||||
if (m_scene.Permissions.IsGod(new UUID(cadu.AgentID)))
|
|
||||||
cadu.godlevel = m_godlevel;
|
|
||||||
cadu.GroupAccess = 0;
|
cadu.GroupAccess = 0;
|
||||||
cadu.Position = AbsolutePosition;
|
cadu.Position = AbsolutePosition;
|
||||||
cadu.regionHandle = m_rootRegionHandle;
|
cadu.regionHandle = m_rootRegionHandle;
|
||||||
|
@ -2707,9 +2708,6 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
agentpos.CopyFrom(cadu);
|
agentpos.CopyFrom(cadu);
|
||||||
|
|
||||||
m_scene.SendOutChildAgentUpdates(agentpos, this);
|
m_scene.SendOutChildAgentUpdates(agentpos, this);
|
||||||
|
|
||||||
m_lastChildAgentUpdatePosition = AbsolutePosition;
|
|
||||||
m_lastChildAgentUpdateCamPosition = CameraPosition;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue