aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorDiva Canto2010-03-05 21:37:18 -0800
committerDiva Canto2010-03-05 21:37:18 -0800
commit6aed4323a33618e9daeeaaeff598b98755c67a3d (patch)
tree6468f6873c1f7dd87f58791a9404ead305a676e7
parentJustin, I must have been dyslexic when I wrote UserGridService as the name fo... (diff)
parentMerge branch 'master' of ssh://opensimulator.org/var/git/opensim (diff)
downloadopensim-SC_OLD-6aed4323a33618e9daeeaaeff598b98755c67a3d.zip
opensim-SC_OLD-6aed4323a33618e9daeeaaeff598b98755c67a3d.tar.gz
opensim-SC_OLD-6aed4323a33618e9daeeaaeff598b98755c67a3d.tar.bz2
opensim-SC_OLD-6aed4323a33618e9daeeaaeff598b98755c67a3d.tar.xz
Merge branch 'master' of ssh://diva@opensimulator.org/var/git/opensim
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLUDPClient.cs35
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs5
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs8
3 files changed, 28 insertions, 20 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLUDPClient.cs b/OpenSim/Region/ClientStack/LindenUDP/LLUDPClient.cs
index 55d9c9c..6232c48 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLUDPClient.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLUDPClient.cs
@@ -144,6 +144,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
144 /// <summary>A reference to the LLUDPServer that is managing this client</summary> 144 /// <summary>A reference to the LLUDPServer that is managing this client</summary>
145 private readonly LLUDPServer m_udpServer; 145 private readonly LLUDPServer m_udpServer;
146 146
147 /// <summary>Caches packed throttle information</summary>
148 private byte[] m_packedThrottles;
149
147 private int m_defaultRTO = 3000; 150 private int m_defaultRTO = 3000;
148 private int m_maxRTO = 60000; 151 private int m_maxRTO = 60000;
149 152
@@ -350,21 +353,31 @@ namespace OpenSim.Region.ClientStack.LindenUDP
350 bucket = m_throttleCategories[(int)ThrottleOutPacketType.Texture]; 353 bucket = m_throttleCategories[(int)ThrottleOutPacketType.Texture];
351 bucket.DripRate = texture; 354 bucket.DripRate = texture;
352 bucket.MaxBurst = texture; 355 bucket.MaxBurst = texture;
356
357 // Reset the packed throttles cached data
358 m_packedThrottles = null;
353 } 359 }
354 360
355 public byte[] GetThrottlesPacked() 361 public byte[] GetThrottlesPacked()
356 { 362 {
357 byte[] data = new byte[7 * 4]; 363 byte[] data = m_packedThrottles;
358 int i = 0; 364
359 365 if (data == null)
360 Buffer.BlockCopy(Utils.FloatToBytes((float)m_throttleCategories[(int)ThrottleOutPacketType.Resend].DripRate), 0, data, i, 4); i += 4; 366 {
361 Buffer.BlockCopy(Utils.FloatToBytes((float)m_throttleCategories[(int)ThrottleOutPacketType.Land].DripRate), 0, data, i, 4); i += 4; 367 data = new byte[7 * 4];
362 Buffer.BlockCopy(Utils.FloatToBytes((float)m_throttleCategories[(int)ThrottleOutPacketType.Wind].DripRate), 0, data, i, 4); i += 4; 368 int i = 0;
363 Buffer.BlockCopy(Utils.FloatToBytes((float)m_throttleCategories[(int)ThrottleOutPacketType.Cloud].DripRate), 0, data, i, 4); i += 4; 369
364 Buffer.BlockCopy(Utils.FloatToBytes((float)(m_throttleCategories[(int)ThrottleOutPacketType.Task].DripRate) + 370 Buffer.BlockCopy(Utils.FloatToBytes((float)m_throttleCategories[(int)ThrottleOutPacketType.Resend].DripRate), 0, data, i, 4); i += 4;
365 m_throttleCategories[(int)ThrottleOutPacketType.State].DripRate), 0, data, i, 4); i += 4; 371 Buffer.BlockCopy(Utils.FloatToBytes((float)m_throttleCategories[(int)ThrottleOutPacketType.Land].DripRate), 0, data, i, 4); i += 4;
366 Buffer.BlockCopy(Utils.FloatToBytes((float)m_throttleCategories[(int)ThrottleOutPacketType.Texture].DripRate), 0, data, i, 4); i += 4; 372 Buffer.BlockCopy(Utils.FloatToBytes((float)m_throttleCategories[(int)ThrottleOutPacketType.Wind].DripRate), 0, data, i, 4); i += 4;
367 Buffer.BlockCopy(Utils.FloatToBytes((float)m_throttleCategories[(int)ThrottleOutPacketType.Asset].DripRate), 0, data, i, 4); i += 4; 373 Buffer.BlockCopy(Utils.FloatToBytes((float)m_throttleCategories[(int)ThrottleOutPacketType.Cloud].DripRate), 0, data, i, 4); i += 4;
374 Buffer.BlockCopy(Utils.FloatToBytes((float)(m_throttleCategories[(int)ThrottleOutPacketType.Task].DripRate) +
375 m_throttleCategories[(int)ThrottleOutPacketType.State].DripRate), 0, data, i, 4); i += 4;
376 Buffer.BlockCopy(Utils.FloatToBytes((float)m_throttleCategories[(int)ThrottleOutPacketType.Texture].DripRate), 0, data, i, 4); i += 4;
377 Buffer.BlockCopy(Utils.FloatToBytes((float)m_throttleCategories[(int)ThrottleOutPacketType.Asset].DripRate), 0, data, i, 4); i += 4;
378
379 m_packedThrottles = data;
380 }
368 381
369 return data; 382 return data;
370 } 383 }
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 7c0375e..30c69a8 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -1133,10 +1133,7 @@ namespace OpenSim.Region.Framework.Scenes
1133 1133
1134 public int GetInaccurateNeighborCount() 1134 public int GetInaccurateNeighborCount()
1135 { 1135 {
1136 lock (m_neighbours) 1136 return m_neighbours.Count;
1137 {
1138 return m_neighbours.Count;
1139 }
1140 } 1137 }
1141 1138
1142 // This is the method that shuts down the scene. 1139 // This is the method that shuts down the scene.
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index 465e916..4256be9 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -2675,6 +2675,9 @@ namespace OpenSim.Region.Framework.Scenes
2675 if (Util.GetDistanceTo(AbsolutePosition, m_lastChildAgentUpdatePosition) >= Scene.ChildReprioritizationDistance || 2675 if (Util.GetDistanceTo(AbsolutePosition, m_lastChildAgentUpdatePosition) >= Scene.ChildReprioritizationDistance ||
2676 Util.GetDistanceTo(CameraPosition, m_lastChildAgentUpdateCamPosition) >= Scene.ChildReprioritizationDistance) 2676 Util.GetDistanceTo(CameraPosition, m_lastChildAgentUpdateCamPosition) >= Scene.ChildReprioritizationDistance)
2677 { 2677 {
2678 m_lastChildAgentUpdatePosition = AbsolutePosition;
2679 m_lastChildAgentUpdateCamPosition = CameraPosition;
2680
2678 ChildAgentDataUpdate cadu = new ChildAgentDataUpdate(); 2681 ChildAgentDataUpdate cadu = new ChildAgentDataUpdate();
2679 cadu.ActiveGroupID = UUID.Zero.Guid; 2682 cadu.ActiveGroupID = UUID.Zero.Guid;
2680 cadu.AgentID = UUID.Guid; 2683 cadu.AgentID = UUID.Guid;
@@ -2683,8 +2686,6 @@ namespace OpenSim.Region.Framework.Scenes
2683 Vector3 tempCameraCenter = m_CameraCenter; 2686 Vector3 tempCameraCenter = m_CameraCenter;
2684 cadu.cameraPosition = tempCameraCenter; 2687 cadu.cameraPosition = tempCameraCenter;
2685 cadu.drawdistance = m_DrawDistance; 2688 cadu.drawdistance = m_DrawDistance;
2686 if (m_scene.Permissions.IsGod(new UUID(cadu.AgentID)))
2687 cadu.godlevel = m_godlevel;
2688 cadu.GroupAccess = 0; 2689 cadu.GroupAccess = 0;
2689 cadu.Position = AbsolutePosition; 2690 cadu.Position = AbsolutePosition;
2690 cadu.regionHandle = m_rootRegionHandle; 2691 cadu.regionHandle = m_rootRegionHandle;
@@ -2707,9 +2708,6 @@ namespace OpenSim.Region.Framework.Scenes
2707 agentpos.CopyFrom(cadu); 2708 agentpos.CopyFrom(cadu);
2708 2709
2709 m_scene.SendOutChildAgentUpdates(agentpos, this); 2710 m_scene.SendOutChildAgentUpdates(agentpos, this);
2710
2711 m_lastChildAgentUpdatePosition = AbsolutePosition;
2712 m_lastChildAgentUpdateCamPosition = CameraPosition;
2713 } 2711 }
2714 } 2712 }
2715 2713