aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/AvatarAppearance.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Framework/AvatarAppearance.cs12
1 files changed, 10 insertions, 2 deletions
diff --git a/OpenSim/Framework/AvatarAppearance.cs b/OpenSim/Framework/AvatarAppearance.cs
index 40179a2..c384336 100644
--- a/OpenSim/Framework/AvatarAppearance.cs
+++ b/OpenSim/Framework/AvatarAppearance.cs
@@ -462,7 +462,10 @@ namespace OpenSim.Framework
462// m_log.WarnFormat("[AVATARAPPEARANCE] set wearable {0} --> {1}:{2}",wearableId,wearable.ItemID,wearable.AssetID); 462// m_log.WarnFormat("[AVATARAPPEARANCE] set wearable {0} --> {1}:{2}",wearableId,wearable.ItemID,wearable.AssetID);
463// DEBUG OFF 463// DEBUG OFF
464 m_wearables[wearableId].Clear(); 464 m_wearables[wearableId].Clear();
465 for (int i = 0; i < wearable.Count; i++) 465 int count = wearable.Count;
466 if (count > AvatarWearable.MAX_WEARABLES)
467 count = AvatarWearable.MAX_WEARABLES;
468 for (int i = 0; i < count; i++)
466 m_wearables[wearableId].Add(wearable[i].ItemID, wearable[i].AssetID); 469 m_wearables[wearableId].Add(wearable[i].ItemID, wearable[i].AssetID);
467 } 470 }
468 471
@@ -755,7 +758,12 @@ namespace OpenSim.Framework
755 if ((data != null) && (data["wearables"] != null) && (data["wearables"]).Type == OSDType.Array) 758 if ((data != null) && (data["wearables"] != null) && (data["wearables"]).Type == OSDType.Array)
756 { 759 {
757 OSDArray wears = (OSDArray)(data["wearables"]); 760 OSDArray wears = (OSDArray)(data["wearables"]);
758 for (int i = 0; i < wears.Count; i++) 761
762 int count = wears.Count;
763 if (count > AvatarWearable.MAX_WEARABLES)
764 count = AvatarWearable.MAX_WEARABLES;
765
766 for (int i = 0; i < count; i++)
759 m_wearables[i] = new AvatarWearable((OSDArray)wears[i]); 767 m_wearables[i] = new AvatarWearable((OSDArray)wears[i]);
760 } 768 }
761 else 769 else