diff options
author | Justin Clark-Casey (justincc) | 2010-10-30 03:07:45 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2010-10-30 03:07:45 +0100 |
commit | f9227977f8190ff1cf094e4adb025a822645371f (patch) | |
tree | 5afbce81eb5359f8beaeaef3f7c30518e689f4f6 /OpenSim/Region/ClientStack | |
parent | minor: remove some old commented out code (diff) | |
parent | Merge branch 'master' of melanie@opensimulator.org:/var/git/opensim (diff) | |
download | opensim-SC_OLD-f9227977f8190ff1cf094e4adb025a822645371f.zip opensim-SC_OLD-f9227977f8190ff1cf094e4adb025a822645371f.tar.gz opensim-SC_OLD-f9227977f8190ff1cf094e4adb025a822645371f.tar.bz2 opensim-SC_OLD-f9227977f8190ff1cf094e4adb025a822645371f.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.cs | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index 14f923d..d7458b7 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | |||
@@ -3387,20 +3387,29 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
3387 | aw.AgentData.SerialNum = (uint)serial; | 3387 | aw.AgentData.SerialNum = (uint)serial; |
3388 | aw.AgentData.SessionID = m_sessionId; | 3388 | aw.AgentData.SessionID = m_sessionId; |
3389 | 3389 | ||
3390 | int count = 0; | ||
3391 | for (int i = 0; i < wearables.Length; i++) | ||
3392 | count += wearables[i].Count; | ||
3393 | |||
3390 | // TODO: don't create new blocks if recycling an old packet | 3394 | // TODO: don't create new blocks if recycling an old packet |
3391 | aw.WearableData = new AgentWearablesUpdatePacket.WearableDataBlock[13]; | 3395 | aw.WearableData = new AgentWearablesUpdatePacket.WearableDataBlock[count]; |
3392 | AgentWearablesUpdatePacket.WearableDataBlock awb; | 3396 | AgentWearablesUpdatePacket.WearableDataBlock awb; |
3397 | int idx = 0; | ||
3393 | for (int i = 0; i < wearables.Length; i++) | 3398 | for (int i = 0; i < wearables.Length; i++) |
3394 | { | 3399 | { |
3395 | awb = new AgentWearablesUpdatePacket.WearableDataBlock(); | 3400 | for (int j = 0; j < wearables[i].Count; j++) |
3396 | awb.WearableType = (byte)i; | 3401 | { |
3397 | awb.AssetID = wearables[i].AssetID; | 3402 | awb = new AgentWearablesUpdatePacket.WearableDataBlock(); |
3398 | awb.ItemID = wearables[i].ItemID; | 3403 | awb.WearableType = (byte)i; |
3399 | aw.WearableData[i] = awb; | 3404 | awb.AssetID = wearables[i][j].AssetID; |
3405 | awb.ItemID = wearables[i][j].ItemID; | ||
3406 | aw.WearableData[idx] = awb; | ||
3407 | idx++; | ||
3400 | 3408 | ||
3401 | // m_log.DebugFormat( | 3409 | // m_log.DebugFormat( |
3402 | // "[APPEARANCE]: Sending wearable item/asset {0} {1} (index {2}) for {3}", | 3410 | // "[APPEARANCE]: Sending wearable item/asset {0} {1} (index {2}) for {3}", |
3403 | // awb.ItemID, awb.AssetID, i, Name); | 3411 | // awb.ItemID, awb.AssetID, i, Name); |
3412 | } | ||
3404 | } | 3413 | } |
3405 | 3414 | ||
3406 | OutPacket(aw, ThrottleOutPacketType.Task); | 3415 | OutPacket(aw, ThrottleOutPacketType.Task); |