diff options
Diffstat (limited to 'OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs')
-rw-r--r-- | OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | 79 |
1 files changed, 56 insertions, 23 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index 14c5d6c..1108863 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,8 +3583,10 @@ 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 | // m_log.WarnFormat("[CLIENT] resending prim update {0}",updates[0].UpdateTime); | ||
3589 | |||
3588 | foreach (EntityUpdate update in updates) | 3590 | foreach (EntityUpdate update in updates) |
3589 | ResendPrimUpdate(update); | 3591 | ResendPrimUpdate(update); |
3590 | } | 3592 | } |
@@ -4018,6 +4020,21 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
4018 | m_entityProps.Enqueue(priority, new ObjectPropertyUpdate(entity,requestFlags,true,false)); | 4020 | m_entityProps.Enqueue(priority, new ObjectPropertyUpdate(entity,requestFlags,true,false)); |
4019 | } | 4021 | } |
4020 | 4022 | ||
4023 | private void ResendPropertyUpdate(ObjectPropertyUpdate update) | ||
4024 | { | ||
4025 | uint priority = 0; | ||
4026 | lock (m_entityProps.SyncRoot) | ||
4027 | m_entityProps.Enqueue(priority, update); | ||
4028 | } | ||
4029 | |||
4030 | private void ResendPropertyUpdates(List<ObjectPropertyUpdate> updates) | ||
4031 | { | ||
4032 | // m_log.WarnFormat("[CLIENT] resending object property {0}",updates[0].UpdateTime); | ||
4033 | |||
4034 | foreach (ObjectPropertyUpdate update in updates) | ||
4035 | ResendPropertyUpdate(update); | ||
4036 | } | ||
4037 | |||
4021 | public void SendObjectPropertiesReply(ISceneEntity entity) | 4038 | public void SendObjectPropertiesReply(ISceneEntity entity) |
4022 | { | 4039 | { |
4023 | uint priority = 0; // time based ordering only | 4040 | uint priority = 0; // time based ordering only |
@@ -4033,6 +4050,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
4033 | OpenSim.Framework.Lazy<List<ObjectPropertiesPacket.ObjectDataBlock>> objectPropertiesBlocks = | 4050 | OpenSim.Framework.Lazy<List<ObjectPropertiesPacket.ObjectDataBlock>> objectPropertiesBlocks = |
4034 | new OpenSim.Framework.Lazy<List<ObjectPropertiesPacket.ObjectDataBlock>>(); | 4051 | new OpenSim.Framework.Lazy<List<ObjectPropertiesPacket.ObjectDataBlock>>(); |
4035 | 4052 | ||
4053 | OpenSim.Framework.Lazy<List<ObjectPropertyUpdate>> familyUpdates = | ||
4054 | new OpenSim.Framework.Lazy<List<ObjectPropertyUpdate>>(); | ||
4055 | |||
4056 | OpenSim.Framework.Lazy<List<ObjectPropertyUpdate>> propertyUpdates = | ||
4057 | new OpenSim.Framework.Lazy<List<ObjectPropertyUpdate>>(); | ||
4058 | |||
4036 | IEntityUpdate iupdate; | 4059 | IEntityUpdate iupdate; |
4037 | Int32 timeinqueue; // this is just debugging code & can be dropped later | 4060 | Int32 timeinqueue; // this is just debugging code & can be dropped later |
4038 | 4061 | ||
@@ -4051,6 +4074,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
4051 | SceneObjectPart sop = (SceneObjectPart)update.Entity; | 4074 | SceneObjectPart sop = (SceneObjectPart)update.Entity; |
4052 | ObjectPropertiesFamilyPacket.ObjectDataBlock objPropDB = CreateObjectPropertiesFamilyBlock(sop,update.Flags); | 4075 | ObjectPropertiesFamilyPacket.ObjectDataBlock objPropDB = CreateObjectPropertiesFamilyBlock(sop,update.Flags); |
4053 | objectFamilyBlocks.Value.Add(objPropDB); | 4076 | objectFamilyBlocks.Value.Add(objPropDB); |
4077 | familyUpdates.Value.Add(update); | ||
4054 | } | 4078 | } |
4055 | } | 4079 | } |
4056 | 4080 | ||
@@ -4061,6 +4085,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
4061 | SceneObjectPart sop = (SceneObjectPart)update.Entity; | 4085 | SceneObjectPart sop = (SceneObjectPart)update.Entity; |
4062 | ObjectPropertiesPacket.ObjectDataBlock objPropDB = CreateObjectPropertiesBlock(sop); | 4086 | ObjectPropertiesPacket.ObjectDataBlock objPropDB = CreateObjectPropertiesBlock(sop); |
4063 | objectPropertiesBlocks.Value.Add(objPropDB); | 4087 | objectPropertiesBlocks.Value.Add(objPropDB); |
4088 | propertyUpdates.Value.Add(update); | ||
4064 | } | 4089 | } |
4065 | } | 4090 | } |
4066 | 4091 | ||
@@ -4068,12 +4093,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
4068 | } | 4093 | } |
4069 | 4094 | ||
4070 | 4095 | ||
4071 | Int32 ppcnt = 0; | 4096 | // Int32 ppcnt = 0; |
4072 | Int32 pbcnt = 0; | 4097 | // Int32 pbcnt = 0; |
4073 | 4098 | ||
4074 | if (objectPropertiesBlocks.IsValueCreated) | 4099 | if (objectPropertiesBlocks.IsValueCreated) |
4075 | { | 4100 | { |
4076 | List<ObjectPropertiesPacket.ObjectDataBlock> blocks = objectPropertiesBlocks.Value; | 4101 | List<ObjectPropertiesPacket.ObjectDataBlock> blocks = objectPropertiesBlocks.Value; |
4102 | List<ObjectPropertyUpdate> updates = propertyUpdates.Value; | ||
4077 | 4103 | ||
4078 | ObjectPropertiesPacket packet = (ObjectPropertiesPacket)PacketPool.Instance.GetPacket(PacketType.ObjectProperties); | 4104 | ObjectPropertiesPacket packet = (ObjectPropertiesPacket)PacketPool.Instance.GetPacket(PacketType.ObjectProperties); |
4079 | packet.ObjectData = new ObjectPropertiesPacket.ObjectDataBlock[blocks.Count]; | 4105 | packet.ObjectData = new ObjectPropertiesPacket.ObjectDataBlock[blocks.Count]; |
@@ -4081,28 +4107,27 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
4081 | packet.ObjectData[i] = blocks[i]; | 4107 | packet.ObjectData[i] = blocks[i]; |
4082 | 4108 | ||
4083 | packet.Header.Zerocoded = true; | 4109 | packet.Header.Zerocoded = true; |
4084 | OutPacket(packet, ThrottleOutPacketType.Task, true); | ||
4085 | 4110 | ||
4086 | pbcnt += blocks.Count; | 4111 | // Pass in the delegate so that if this packet needs to be resent, we send the current properties |
4087 | ppcnt++; | 4112 | // of the object rather than the properties when the packet was created |
4113 | OutPacket(packet, ThrottleOutPacketType.Task, true, | ||
4114 | delegate() | ||
4115 | { | ||
4116 | ResendPropertyUpdates(updates); | ||
4117 | }); | ||
4118 | |||
4119 | // pbcnt += blocks.Count; | ||
4120 | // ppcnt++; | ||
4088 | } | 4121 | } |
4089 | 4122 | ||
4090 | Int32 fpcnt = 0; | 4123 | // Int32 fpcnt = 0; |
4091 | Int32 fbcnt = 0; | 4124 | // Int32 fbcnt = 0; |
4092 | 4125 | ||
4093 | if (objectFamilyBlocks.IsValueCreated) | 4126 | if (objectFamilyBlocks.IsValueCreated) |
4094 | { | 4127 | { |
4095 | List<ObjectPropertiesFamilyPacket.ObjectDataBlock> blocks = objectFamilyBlocks.Value; | 4128 | List<ObjectPropertiesFamilyPacket.ObjectDataBlock> blocks = objectFamilyBlocks.Value; |
4096 | 4129 | List<ObjectPropertyUpdate> updates = familyUpdates.Value; | |
4097 | // ObjectPropertiesFamilyPacket objPropFamilyPack = | 4130 | |
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... | 4131 | // one packet per object block... uggh... |
4107 | for (int i = 0; i < blocks.Count; i++) | 4132 | for (int i = 0; i < blocks.Count; i++) |
4108 | { | 4133 | { |
@@ -4111,10 +4136,18 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
4111 | 4136 | ||
4112 | packet.ObjectData = blocks[i]; | 4137 | packet.ObjectData = blocks[i]; |
4113 | packet.Header.Zerocoded = true; | 4138 | packet.Header.Zerocoded = true; |
4114 | OutPacket(packet, ThrottleOutPacketType.Task); | ||
4115 | 4139 | ||
4116 | fpcnt++; | 4140 | // Pass in the delegate so that if this packet needs to be resent, we send the current properties |
4117 | fbcnt++; | 4141 | // of the object rather than the properties when the packet was created |
4142 | ObjectPropertyUpdate update = updates[i]; | ||
4143 | OutPacket(packet, ThrottleOutPacketType.Task, true, | ||
4144 | delegate() | ||
4145 | { | ||
4146 | ResendPropertyUpdate(update); | ||
4147 | }); | ||
4148 | |||
4149 | // fpcnt++; | ||
4150 | // fbcnt++; | ||
4118 | } | 4151 | } |
4119 | 4152 | ||
4120 | } | 4153 | } |
@@ -4151,7 +4184,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
4151 | 4184 | ||
4152 | return block; | 4185 | return block; |
4153 | } | 4186 | } |
4154 | 4187 | ||
4155 | private ObjectPropertiesPacket.ObjectDataBlock CreateObjectPropertiesBlock(SceneObjectPart sop) | 4188 | private ObjectPropertiesPacket.ObjectDataBlock CreateObjectPropertiesBlock(SceneObjectPart sop) |
4156 | { | 4189 | { |
4157 | //ObjectPropertiesPacket proper = (ObjectPropertiesPacket)PacketPool.Instance.GetPacket(PacketType.ObjectProperties); | 4190 | //ObjectPropertiesPacket proper = (ObjectPropertiesPacket)PacketPool.Instance.GetPacket(PacketType.ObjectProperties); |