aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs')
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs75
1 files changed, 52 insertions, 23 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
index 14c5d6c..87b86eb 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
@@ -3567,7 +3567,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3567 /// with any other updates that may be queued for the same entity. 3567 /// with any other updates that may be queued for the same entity.
3568 /// The original update time is used for the merged update. 3568 /// The original update time is used for the merged update.
3569 /// </summary> 3569 /// </summary>
3570 public void ResendPrimUpdate(EntityUpdate update) 3570 private void ResendPrimUpdate(EntityUpdate update)
3571 { 3571 {
3572 // If the update exists in priority queue, it will be updated. 3572 // If the update exists in priority queue, it will be updated.
3573 // If it does not exist then it will be added with the current (rather than its original) priority 3573 // If it does not exist then it will be added with the current (rather than its original) priority
@@ -3583,7 +3583,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3583 /// with any other updates that may be queued for the same entity. 3583 /// with any other updates that may be queued for the same entity.
3584 /// The original update time is used for the merged update. 3584 /// The original update time is used for the merged update.
3585 /// </summary> 3585 /// </summary>
3586 void ResendPrimUpdates(List<EntityUpdate> updates) 3586 private void ResendPrimUpdates(List<EntityUpdate> updates)
3587 { 3587 {
3588 foreach (EntityUpdate update in updates) 3588 foreach (EntityUpdate update in updates)
3589 ResendPrimUpdate(update); 3589 ResendPrimUpdate(update);
@@ -4018,6 +4018,19 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4018 m_entityProps.Enqueue(priority, new ObjectPropertyUpdate(entity,requestFlags,true,false)); 4018 m_entityProps.Enqueue(priority, new ObjectPropertyUpdate(entity,requestFlags,true,false));
4019 } 4019 }
4020 4020
4021 private void ResendPropertyUpdate(ObjectPropertyUpdate update)
4022 {
4023 uint priority = 0;
4024 lock (m_entityProps.SyncRoot)
4025 m_entityProps.Enqueue(priority, update);
4026 }
4027
4028 private void ResendPropertyUpdates(List<ObjectPropertyUpdate> updates)
4029 {
4030 foreach (ObjectPropertyUpdate update in updates)
4031 ResendPropertyUpdate(update);
4032 }
4033
4021 public void SendObjectPropertiesReply(ISceneEntity entity) 4034 public void SendObjectPropertiesReply(ISceneEntity entity)
4022 { 4035 {
4023 uint priority = 0; // time based ordering only 4036 uint priority = 0; // time based ordering only
@@ -4033,6 +4046,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4033 OpenSim.Framework.Lazy<List<ObjectPropertiesPacket.ObjectDataBlock>> objectPropertiesBlocks = 4046 OpenSim.Framework.Lazy<List<ObjectPropertiesPacket.ObjectDataBlock>> objectPropertiesBlocks =
4034 new OpenSim.Framework.Lazy<List<ObjectPropertiesPacket.ObjectDataBlock>>(); 4047 new OpenSim.Framework.Lazy<List<ObjectPropertiesPacket.ObjectDataBlock>>();
4035 4048
4049 OpenSim.Framework.Lazy<List<ObjectPropertyUpdate>> familyUpdates =
4050 new OpenSim.Framework.Lazy<List<ObjectPropertyUpdate>>();
4051
4052 OpenSim.Framework.Lazy<List<ObjectPropertyUpdate>> propertyUpdates =
4053 new OpenSim.Framework.Lazy<List<ObjectPropertyUpdate>>();
4054
4036 IEntityUpdate iupdate; 4055 IEntityUpdate iupdate;
4037 Int32 timeinqueue; // this is just debugging code & can be dropped later 4056 Int32 timeinqueue; // this is just debugging code & can be dropped later
4038 4057
@@ -4051,6 +4070,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4051 SceneObjectPart sop = (SceneObjectPart)update.Entity; 4070 SceneObjectPart sop = (SceneObjectPart)update.Entity;
4052 ObjectPropertiesFamilyPacket.ObjectDataBlock objPropDB = CreateObjectPropertiesFamilyBlock(sop,update.Flags); 4071 ObjectPropertiesFamilyPacket.ObjectDataBlock objPropDB = CreateObjectPropertiesFamilyBlock(sop,update.Flags);
4053 objectFamilyBlocks.Value.Add(objPropDB); 4072 objectFamilyBlocks.Value.Add(objPropDB);
4073 familyUpdates.Value.Add(update);
4054 } 4074 }
4055 } 4075 }
4056 4076
@@ -4061,6 +4081,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4061 SceneObjectPart sop = (SceneObjectPart)update.Entity; 4081 SceneObjectPart sop = (SceneObjectPart)update.Entity;
4062 ObjectPropertiesPacket.ObjectDataBlock objPropDB = CreateObjectPropertiesBlock(sop); 4082 ObjectPropertiesPacket.ObjectDataBlock objPropDB = CreateObjectPropertiesBlock(sop);
4063 objectPropertiesBlocks.Value.Add(objPropDB); 4083 objectPropertiesBlocks.Value.Add(objPropDB);
4084 propertyUpdates.Value.Add(update);
4064 } 4085 }
4065 } 4086 }
4066 4087
@@ -4068,12 +4089,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4068 } 4089 }
4069 4090
4070 4091
4071 Int32 ppcnt = 0; 4092 // Int32 ppcnt = 0;
4072 Int32 pbcnt = 0; 4093 // Int32 pbcnt = 0;
4073 4094
4074 if (objectPropertiesBlocks.IsValueCreated) 4095 if (objectPropertiesBlocks.IsValueCreated)
4075 { 4096 {
4076 List<ObjectPropertiesPacket.ObjectDataBlock> blocks = objectPropertiesBlocks.Value; 4097 List<ObjectPropertiesPacket.ObjectDataBlock> blocks = objectPropertiesBlocks.Value;
4098 List<ObjectPropertyUpdate> updates = propertyUpdates.Value;
4077 4099
4078 ObjectPropertiesPacket packet = (ObjectPropertiesPacket)PacketPool.Instance.GetPacket(PacketType.ObjectProperties); 4100 ObjectPropertiesPacket packet = (ObjectPropertiesPacket)PacketPool.Instance.GetPacket(PacketType.ObjectProperties);
4079 packet.ObjectData = new ObjectPropertiesPacket.ObjectDataBlock[blocks.Count]; 4101 packet.ObjectData = new ObjectPropertiesPacket.ObjectDataBlock[blocks.Count];
@@ -4081,28 +4103,27 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4081 packet.ObjectData[i] = blocks[i]; 4103 packet.ObjectData[i] = blocks[i];
4082 4104
4083 packet.Header.Zerocoded = true; 4105 packet.Header.Zerocoded = true;
4084 OutPacket(packet, ThrottleOutPacketType.Task, true);
4085 4106
4086 pbcnt += blocks.Count; 4107 // Pass in the delegate so that if this packet needs to be resent, we send the current properties
4087 ppcnt++; 4108 // of the object rather than the properties when the packet was created
4109 OutPacket(packet, ThrottleOutPacketType.Task, true,
4110 delegate()
4111 {
4112 ResendPropertyUpdates(updates);
4113 });
4114
4115 // pbcnt += blocks.Count;
4116 // ppcnt++;
4088 } 4117 }
4089 4118
4090 Int32 fpcnt = 0; 4119 // Int32 fpcnt = 0;
4091 Int32 fbcnt = 0; 4120 // Int32 fbcnt = 0;
4092 4121
4093 if (objectFamilyBlocks.IsValueCreated) 4122 if (objectFamilyBlocks.IsValueCreated)
4094 { 4123 {
4095 List<ObjectPropertiesFamilyPacket.ObjectDataBlock> blocks = objectFamilyBlocks.Value; 4124 List<ObjectPropertiesFamilyPacket.ObjectDataBlock> blocks = objectFamilyBlocks.Value;
4096 4125 List<ObjectPropertyUpdate> updates = familyUpdates.Value;
4097 // ObjectPropertiesFamilyPacket objPropFamilyPack = 4126
4098 // (ObjectPropertiesFamilyPacket)PacketPool.Instance.GetPacket(PacketType.ObjectPropertiesFamily);
4099 //
4100 // objPropFamilyPack.ObjectData = new ObjectPropertiesFamilyPacket.ObjectDataBlock[blocks.Count];
4101 // for (int i = 0; i < blocks.Count; i++)
4102 // objPropFamilyPack.ObjectData[i] = blocks[i];
4103 //
4104 // OutPacket(objPropFamilyPack, ThrottleOutPacketType.Task, true);
4105
4106 // one packet per object block... uggh... 4127 // one packet per object block... uggh...
4107 for (int i = 0; i < blocks.Count; i++) 4128 for (int i = 0; i < blocks.Count; i++)
4108 { 4129 {
@@ -4111,10 +4132,18 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4111 4132
4112 packet.ObjectData = blocks[i]; 4133 packet.ObjectData = blocks[i];
4113 packet.Header.Zerocoded = true; 4134 packet.Header.Zerocoded = true;
4114 OutPacket(packet, ThrottleOutPacketType.Task);
4115 4135
4116 fpcnt++; 4136 // Pass in the delegate so that if this packet needs to be resent, we send the current properties
4117 fbcnt++; 4137 // of the object rather than the properties when the packet was created
4138 ObjectPropertyUpdate update = updates[i];
4139 OutPacket(packet, ThrottleOutPacketType.Task, true,
4140 delegate()
4141 {
4142 ResendPropertyUpdate(update);
4143 });
4144
4145 // fpcnt++;
4146 // fbcnt++;
4118 } 4147 }
4119 4148
4120 } 4149 }
@@ -4151,7 +4180,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4151 4180
4152 return block; 4181 return block;
4153 } 4182 }
4154 4183
4155 private ObjectPropertiesPacket.ObjectDataBlock CreateObjectPropertiesBlock(SceneObjectPart sop) 4184 private ObjectPropertiesPacket.ObjectDataBlock CreateObjectPropertiesBlock(SceneObjectPart sop)
4156 { 4185 {
4157 //ObjectPropertiesPacket proper = (ObjectPropertiesPacket)PacketPool.Instance.GetPacket(PacketType.ObjectProperties); 4186 //ObjectPropertiesPacket proper = (ObjectPropertiesPacket)PacketPool.Instance.GetPacket(PacketType.ObjectProperties);