diff options
Diffstat (limited to 'OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs')
-rw-r--r-- | OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index b532cd4..4c9011a 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | |||
@@ -3417,20 +3417,29 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
3417 | aw.AgentData.SerialNum = (uint)serial; | 3417 | aw.AgentData.SerialNum = (uint)serial; |
3418 | aw.AgentData.SessionID = m_sessionId; | 3418 | aw.AgentData.SessionID = m_sessionId; |
3419 | 3419 | ||
3420 | int count = 0; | ||
3421 | for (int i = 0; i < wearables.Length; i++) | ||
3422 | count += wearables[i].Count; | ||
3423 | |||
3420 | // TODO: don't create new blocks if recycling an old packet | 3424 | // TODO: don't create new blocks if recycling an old packet |
3421 | aw.WearableData = new AgentWearablesUpdatePacket.WearableDataBlock[13]; | 3425 | aw.WearableData = new AgentWearablesUpdatePacket.WearableDataBlock[count]; |
3422 | AgentWearablesUpdatePacket.WearableDataBlock awb; | 3426 | AgentWearablesUpdatePacket.WearableDataBlock awb; |
3427 | int idx = 0; | ||
3423 | for (int i = 0; i < wearables.Length; i++) | 3428 | for (int i = 0; i < wearables.Length; i++) |
3424 | { | 3429 | { |
3425 | awb = new AgentWearablesUpdatePacket.WearableDataBlock(); | 3430 | for (int j = 0; j < wearables[i].Count; j++) |
3426 | awb.WearableType = (byte)i; | 3431 | { |
3427 | awb.AssetID = wearables[i].AssetID; | 3432 | awb = new AgentWearablesUpdatePacket.WearableDataBlock(); |
3428 | awb.ItemID = wearables[i].ItemID; | 3433 | awb.WearableType = (byte)i; |
3429 | aw.WearableData[i] = awb; | 3434 | awb.AssetID = wearables[i][j].AssetID; |
3435 | awb.ItemID = wearables[i][j].ItemID; | ||
3436 | aw.WearableData[idx] = awb; | ||
3437 | idx++; | ||
3430 | 3438 | ||
3431 | // m_log.DebugFormat( | 3439 | // m_log.DebugFormat( |
3432 | // "[APPEARANCE]: Sending wearable item/asset {0} {1} (index {2}) for {3}", | 3440 | // "[APPEARANCE]: Sending wearable item/asset {0} {1} (index {2}) for {3}", |
3433 | // awb.ItemID, awb.AssetID, i, Name); | 3441 | // awb.ItemID, awb.AssetID, i, Name); |
3442 | } | ||
3434 | } | 3443 | } |
3435 | 3444 | ||
3436 | OutPacket(aw, ThrottleOutPacketType.Task); | 3445 | OutPacket(aw, ThrottleOutPacketType.Task); |
@@ -5759,6 +5768,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
5759 | AvatarWearingArgs wearingArgs = new AvatarWearingArgs(); | 5768 | AvatarWearingArgs wearingArgs = new AvatarWearingArgs(); |
5760 | for (int i = 0; i < nowWearing.WearableData.Length; i++) | 5769 | for (int i = 0; i < nowWearing.WearableData.Length; i++) |
5761 | { | 5770 | { |
5771 | m_log.DebugFormat("[XXX]: Wearable type {0} item {1}", nowWearing.WearableData[i].WearableType, nowWearing.WearableData[i].ItemID); | ||
5762 | AvatarWearingArgs.Wearable wearable = | 5772 | AvatarWearingArgs.Wearable wearable = |
5763 | new AvatarWearingArgs.Wearable(nowWearing.WearableData[i].ItemID, | 5773 | new AvatarWearingArgs.Wearable(nowWearing.WearableData[i].ItemID, |
5764 | nowWearing.WearableData[i].WearableType); | 5774 | nowWearing.WearableData[i].WearableType); |