aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/AvatarAppearance.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Framework/AvatarAppearance.cs17
1 files changed, 16 insertions, 1 deletions
diff --git a/OpenSim/Framework/AvatarAppearance.cs b/OpenSim/Framework/AvatarAppearance.cs
index c384336..25ae0ec 100644
--- a/OpenSim/Framework/AvatarAppearance.cs
+++ b/OpenSim/Framework/AvatarAppearance.cs
@@ -183,7 +183,7 @@ namespace OpenSim.Framework
183 m_attachments = new Dictionary<int, List<AvatarAttachment>>(); 183 m_attachments = new Dictionary<int, List<AvatarAttachment>>();
184 } 184 }
185 185
186 public AvatarAppearance(AvatarAppearance appearance) : this(appearance, true) 186 public AvatarAppearance(AvatarAppearance appearance): this(appearance, true)
187 { 187 {
188 } 188 }
189 189
@@ -221,6 +221,8 @@ namespace OpenSim.Framework
221 { 221 {
222 byte[] tbytes = appearance.Texture.GetBytes(); 222 byte[] tbytes = appearance.Texture.GetBytes();
223 m_texture = new Primitive.TextureEntry(tbytes,0,tbytes.Length); 223 m_texture = new Primitive.TextureEntry(tbytes,0,tbytes.Length);
224 if (appearance.m_cacheitems != null)
225 m_cacheitems = (WearableCacheItem[]) appearance.m_cacheitems.Clone();
224 } 226 }
225 227
226 m_visualparams = null; 228 m_visualparams = null;
@@ -723,6 +725,13 @@ namespace OpenSim.Framework
723 } 725 }
724 data["textures"] = textures; 726 data["textures"] = textures;
725 727
728 if (m_cacheitems != null)
729 {
730 OSDArray baked = WearableCacheItem.BakedToOSD(m_cacheitems);
731 if (baked != null)
732 data["bakedcache"] = baked;
733 }
734
726 // Visual Parameters 735 // Visual Parameters
727 OSDBinary visualparams = new OSDBinary(m_visualparams); 736 OSDBinary visualparams = new OSDBinary(m_visualparams);
728 data["visualparams"] = visualparams; 737 data["visualparams"] = visualparams;
@@ -789,6 +798,12 @@ namespace OpenSim.Framework
789 m_log.Warn("[AVATAR APPEARANCE]: failed to unpack textures"); 798 m_log.Warn("[AVATAR APPEARANCE]: failed to unpack textures");
790 } 799 }
791 800
801 if ((data != null) && (data["bakedcache"] != null) && (data["bakedcache"]).Type == OSDType.Array)
802 {
803 OSDArray bakedOSDArray = (OSDArray)(data["bakedcache"]);
804 m_cacheitems = WearableCacheItem.BakedFromOSD(bakedOSDArray);
805 }
806
792 // Visual Parameters 807 // Visual Parameters
793 SetDefaultParams(); 808 SetDefaultParams();
794 if ((data != null) && (data["visualparams"] != null)) 809 if ((data != null) && (data["visualparams"] != null))