aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
diff options
context:
space:
mode:
authorUbitUmarov2017-07-10 22:01:38 +0100
committerUbitUmarov2017-07-10 22:01:38 +0100
commit40b16f1705bd6361d7fd0cd2bc458ae9ea381bf1 (patch)
tree1c9c9073397754a671fb2a4547394177b756b6db /OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
parenta few more changes on entities updates (diff)
downloadopensim-SC-40b16f1705bd6361d7fd0cd2bc458ae9ea381bf1.zip
opensim-SC-40b16f1705bd6361d7fd0cd2bc458ae9ea381bf1.tar.gz
opensim-SC-40b16f1705bd6361d7fd0cd2bc458ae9ea381bf1.tar.bz2
opensim-SC-40b16f1705bd6361d7fd0cd2bc458ae9ea381bf1.tar.xz
SimpleAngularDistance update prioritization scheme ameks no sense without ordered dequeue of the updates
Diffstat (limited to 'OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs')
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs30
1 files changed, 26 insertions, 4 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
index 954f21f..861b79e 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
@@ -4137,6 +4137,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4137 Vector3 mypos = Vector3.Zero; 4137 Vector3 mypos = Vector3.Zero;
4138 ScenePresence mysp = (ScenePresence)SceneAgent; 4138 ScenePresence mysp = (ScenePresence)SceneAgent;
4139 4139
4140 bool orderedDequeue = m_scene.UpdatePrioritizationScheme == UpdatePrioritizationSchemes.SimpleAngularDistance;
4140 // we should have a presence 4141 // we should have a presence
4141 if(mysp == null) 4142 if(mysp == null)
4142 return; 4143 return;
@@ -4151,8 +4152,18 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4151 while (maxUpdatesBytes > 0) 4152 while (maxUpdatesBytes > 0)
4152 { 4153 {
4153 lock (m_entityUpdates.SyncRoot) 4154 lock (m_entityUpdates.SyncRoot)
4154 if (!m_entityUpdates.TryDequeue(out update, out timeinqueue)) 4155 {
4155 break; 4156 if(orderedDequeue)
4157 {
4158 if (!m_entityUpdates.TryOrderedDequeue(out update, out timeinqueue))
4159 break;
4160 }
4161 else
4162 {
4163 if (!m_entityUpdates.TryDequeue(out update, out timeinqueue))
4164 break;
4165 }
4166 }
4156 4167
4157 PrimUpdateFlags updateFlags = (PrimUpdateFlags)update.Flags; 4168 PrimUpdateFlags updateFlags = (PrimUpdateFlags)update.Flags;
4158 4169
@@ -4850,6 +4861,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4850// OpenSim.Framework.Lazy<List<ObjectPropertyUpdate>> propertyUpdates = 4861// OpenSim.Framework.Lazy<List<ObjectPropertyUpdate>> propertyUpdates =
4851// new OpenSim.Framework.Lazy<List<ObjectPropertyUpdate>>(); 4862// new OpenSim.Framework.Lazy<List<ObjectPropertyUpdate>>();
4852 4863
4864 bool orderedDequeue = m_scene.UpdatePrioritizationScheme == UpdatePrioritizationSchemes.SimpleAngularDistance;
4853 4865
4854 EntityUpdate iupdate; 4866 EntityUpdate iupdate;
4855 Int32 timeinqueue; // this is just debugging code & can be dropped later 4867 Int32 timeinqueue; // this is just debugging code & can be dropped later
@@ -4857,8 +4869,18 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4857 while (maxUpdateBytes > 0) 4869 while (maxUpdateBytes > 0)
4858 { 4870 {
4859 lock (m_entityProps.SyncRoot) 4871 lock (m_entityProps.SyncRoot)
4860 if (!m_entityProps.TryDequeue(out iupdate, out timeinqueue)) 4872 {
4861 break; 4873 if(orderedDequeue)
4874 {
4875 if (!m_entityProps.TryOrderedDequeue(out iupdate, out timeinqueue))
4876 break;
4877 }
4878 else
4879 {
4880 if (!m_entityProps.TryDequeue(out iupdate, out timeinqueue))
4881 break;
4882 }
4883 }
4862 4884
4863 ObjectPropertyUpdate update = (ObjectPropertyUpdate)iupdate; 4885 ObjectPropertyUpdate update = (ObjectPropertyUpdate)iupdate;
4864 if (update.SendFamilyProps) 4886 if (update.SendFamilyProps)