aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack
diff options
context:
space:
mode:
authorDiva Canto2010-12-23 10:05:45 -0800
committerDiva Canto2010-12-23 10:05:45 -0800
commitbc67bc0d949e5b71dbd924b8119b0232b149cfb6 (patch)
tree3ca3ac8bda0d4b64ba3cacdefca920f5c2105ea8 /OpenSim/Region/ClientStack
parentRemoved unused code -- this was the previous version of UDP texture sending, ... (diff)
parentPut back a commented section of code. With some viewers, object inventory (diff)
downloadopensim-SC_OLD-bc67bc0d949e5b71dbd924b8119b0232b149cfb6.zip
opensim-SC_OLD-bc67bc0d949e5b71dbd924b8119b0232b149cfb6.tar.gz
opensim-SC_OLD-bc67bc0d949e5b71dbd924b8119b0232b149cfb6.tar.bz2
opensim-SC_OLD-bc67bc0d949e5b71dbd924b8119b0232b149cfb6.tar.xz
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
Diffstat (limited to 'OpenSim/Region/ClientStack')
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs18
1 files changed, 12 insertions, 6 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
index 4e4ecea..d63b719 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
@@ -3554,7 +3554,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3554 double priority = m_prioritizer.GetUpdatePriority(this, entity); 3554 double priority = m_prioritizer.GetUpdatePriority(this, entity);
3555 3555
3556 lock (m_entityUpdates.SyncRoot) 3556 lock (m_entityUpdates.SyncRoot)
3557 m_entityUpdates.Enqueue(priority, new EntityUpdate(entity, updateFlags), entity.LocalId); 3557 m_entityUpdates.Enqueue(priority, new EntityUpdate(entity, updateFlags, m_scene.TimeDilation), entity.LocalId);
3558 } 3558 }
3559 3559
3560 private void ProcessEntityUpdates(int maxUpdates) 3560 private void ProcessEntityUpdates(int maxUpdates)
@@ -3570,14 +3570,17 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3570 // We must lock for both manipulating the kill record and sending the packet, in order to avoid a race 3570 // We must lock for both manipulating the kill record and sending the packet, in order to avoid a race
3571 // condition where a kill can be processed before an out-of-date update for the same object. 3571 // condition where a kill can be processed before an out-of-date update for the same object.
3572 lock (m_killRecord) 3572 lock (m_killRecord)
3573 { 3573 {
3574 float avgTimeDilation = 1.0f;
3574 EntityUpdate update; 3575 EntityUpdate update;
3575 while (updatesThisCall < maxUpdates) 3576 while (updatesThisCall < maxUpdates)
3576 { 3577 {
3577 lock (m_entityUpdates.SyncRoot) 3578 lock (m_entityUpdates.SyncRoot)
3578 if (!m_entityUpdates.TryDequeue(out update)) 3579 if (!m_entityUpdates.TryDequeue(out update))
3579 break; 3580 break;
3580 3581 avgTimeDilation += update.TimeDilation;
3582 avgTimeDilation *= 0.5f;
3583
3581 if (update.Entity is SceneObjectPart) 3584 if (update.Entity is SceneObjectPart)
3582 { 3585 {
3583 SceneObjectPart part = (SceneObjectPart)update.Entity; 3586 SceneObjectPart part = (SceneObjectPart)update.Entity;
@@ -3725,8 +3728,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3725 3728
3726 #region Packet Sending 3729 #region Packet Sending
3727 3730
3728 const float TIME_DILATION = 1.0f; 3731 //const float TIME_DILATION = 1.0f;
3729 ushort timeDilation = Utils.FloatToUInt16(TIME_DILATION, 0.0f, 1.0f); 3732
3733
3734 ushort timeDilation = Utils.FloatToUInt16(avgTimeDilation, 0.0f, 1.0f);
3730 3735
3731 if (terseAgentUpdateBlocks.IsValueCreated) 3736 if (terseAgentUpdateBlocks.IsValueCreated)
3732 { 3737 {
@@ -3739,7 +3744,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3739 3744
3740 for (int i = 0; i < blocks.Count; i++) 3745 for (int i = 0; i < blocks.Count; i++)
3741 packet.ObjectData[i] = blocks[i]; 3746 packet.ObjectData[i] = blocks[i];
3742 3747
3748
3743 OutPacket(packet, ThrottleOutPacketType.Unknown, true); 3749 OutPacket(packet, ThrottleOutPacketType.Unknown, true);
3744 } 3750 }
3745 3751