diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Framework/AvatarAppearance.cs | 162 |
1 files changed, 105 insertions, 57 deletions
diff --git a/OpenSim/Framework/AvatarAppearance.cs b/OpenSim/Framework/AvatarAppearance.cs index 26dd5df..77a7621 100644 --- a/OpenSim/Framework/AvatarAppearance.cs +++ b/OpenSim/Framework/AvatarAppearance.cs | |||
@@ -53,7 +53,11 @@ namespace OpenSim.Framework | |||
53 | // should be only used as initial default value ( V1 viewers ) | 53 | // should be only used as initial default value ( V1 viewers ) |
54 | public readonly static int VISUALPARAM_COUNT = 218; | 54 | public readonly static int VISUALPARAM_COUNT = 218; |
55 | 55 | ||
56 | public readonly static int TEXTURE_COUNT = 21; | 56 | // public readonly static int TEXTURE_COUNT = 21 |
57 | // 21 bad, make it be updated as libovm gets update | ||
58 | // also keeping in sync with it | ||
59 | public readonly static int TEXTURE_COUNT = Primitive.TextureEntry.MAX_FACES; | ||
60 | |||
57 | public readonly static byte[] BAKE_INDICES = new byte[] { 8, 9, 10, 11, 19, 20 }; | 61 | public readonly static byte[] BAKE_INDICES = new byte[] { 8, 9, 10, 11, 19, 20 }; |
58 | 62 | ||
59 | protected int m_serial = 0; | 63 | protected int m_serial = 0; |
@@ -69,8 +73,6 @@ namespace OpenSim.Framework | |||
69 | protected WearableCacheItem[] m_cacheitems; | 73 | protected WearableCacheItem[] m_cacheitems; |
70 | protected bool m_cacheItemsDirty = true; | 74 | protected bool m_cacheItemsDirty = true; |
71 | 75 | ||
72 | |||
73 | public bool PackLegacyWearables {get; set; } | ||
74 | public virtual int Serial | 76 | public virtual int Serial |
75 | { | 77 | { |
76 | get { return m_serial; } | 78 | get { return m_serial; } |
@@ -119,7 +121,7 @@ namespace OpenSim.Framework | |||
119 | get { return m_avatarHeight; } | 121 | get { return m_avatarHeight; } |
120 | set { m_avatarHeight = value; } | 122 | set { m_avatarHeight = value; } |
121 | } | 123 | } |
122 | 124 | ||
123 | public virtual WearableCacheItem[] WearableCacheItems | 125 | public virtual WearableCacheItem[] WearableCacheItems |
124 | { | 126 | { |
125 | get { return m_cacheitems; } | 127 | get { return m_cacheitems; } |
@@ -135,7 +137,7 @@ namespace OpenSim.Framework | |||
135 | public AvatarAppearance() | 137 | public AvatarAppearance() |
136 | { | 138 | { |
137 | // m_log.WarnFormat("[AVATAR APPEARANCE]: create empty appearance"); | 139 | // m_log.WarnFormat("[AVATAR APPEARANCE]: create empty appearance"); |
138 | PackLegacyWearables = false; | 140 | |
139 | m_serial = 0; | 141 | m_serial = 0; |
140 | SetDefaultWearables(); | 142 | SetDefaultWearables(); |
141 | SetDefaultTexture(); | 143 | SetDefaultTexture(); |
@@ -181,11 +183,16 @@ namespace OpenSim.Framework | |||
181 | m_attachments = new Dictionary<int, List<AvatarAttachment>>(); | 183 | m_attachments = new Dictionary<int, List<AvatarAttachment>>(); |
182 | } | 184 | } |
183 | 185 | ||
184 | public AvatarAppearance(AvatarAppearance appearance) : this(appearance, true) | 186 | public AvatarAppearance(AvatarAppearance appearance): this(appearance, true,true) |
185 | { | 187 | { |
186 | } | 188 | } |
187 | 189 | ||
188 | public AvatarAppearance(AvatarAppearance appearance, bool copyWearables) | 190 | public AvatarAppearance(AvatarAppearance appearance, bool copyWearables) |
191 | : this(appearance, copyWearables, true) | ||
192 | { | ||
193 | } | ||
194 | |||
195 | public AvatarAppearance(AvatarAppearance appearance, bool copyWearables, bool copyBaked) | ||
189 | { | 196 | { |
190 | // m_log.WarnFormat("[AVATAR APPEARANCE] create from an existing appearance"); | 197 | // m_log.WarnFormat("[AVATAR APPEARANCE] create from an existing appearance"); |
191 | 198 | ||
@@ -204,24 +211,29 @@ namespace OpenSim.Framework | |||
204 | 211 | ||
205 | m_serial = appearance.Serial; | 212 | m_serial = appearance.Serial; |
206 | 213 | ||
207 | m_wearables = new AvatarWearable[AvatarWearable.MAX_WEARABLES]; | ||
208 | for (int i = 0; i < AvatarWearable.MAX_WEARABLES; i++) | ||
209 | m_wearables[i] = new AvatarWearable(); | ||
210 | |||
211 | if (copyWearables && (appearance.Wearables != null)) | 214 | if (copyWearables && (appearance.Wearables != null)) |
212 | { | 215 | { |
213 | int len = appearance.Wearables.Length; | 216 | m_wearables = new AvatarWearable[appearance.Wearables.Length]; |
214 | if(len > AvatarWearable.MAX_WEARABLES) | 217 | for (int i = 0; i < appearance.Wearables.Length; i++) |
215 | len = AvatarWearable.MAX_WEARABLES; | 218 | { |
216 | for (int i = 0; i < len; i++) | 219 | m_wearables[i] = new AvatarWearable(); |
217 | SetWearable(i,appearance.Wearables[i]); | 220 | AvatarWearable wearable = appearance.Wearables[i]; |
221 | for (int j = 0; j < wearable.Count; j++) | ||
222 | m_wearables[i].Add(wearable[j].ItemID, wearable[j].AssetID); | ||
223 | } | ||
218 | } | 224 | } |
225 | else | ||
226 | ClearWearables(); | ||
219 | 227 | ||
220 | m_texture = null; | 228 | m_texture = null; |
221 | if (appearance.Texture != null) | 229 | if (appearance.Texture != null) |
222 | { | 230 | { |
223 | byte[] tbytes = appearance.Texture.GetBytes(); | 231 | byte[] tbytes = appearance.Texture.GetBytes(); |
224 | m_texture = new Primitive.TextureEntry(tbytes,0,tbytes.Length); | 232 | m_texture = new Primitive.TextureEntry(tbytes,0,tbytes.Length); |
233 | if (copyBaked && appearance.m_cacheitems != null) | ||
234 | m_cacheitems = (WearableCacheItem[])appearance.m_cacheitems.Clone(); | ||
235 | else | ||
236 | m_cacheitems = null; | ||
225 | } | 237 | } |
226 | 238 | ||
227 | m_visualparams = null; | 239 | m_visualparams = null; |
@@ -239,9 +251,17 @@ namespace OpenSim.Framework | |||
239 | 251 | ||
240 | public void GetAssetsFrom(AvatarAppearance app) | 252 | public void GetAssetsFrom(AvatarAppearance app) |
241 | { | 253 | { |
242 | for (int i = 0; i < AvatarWearable.MAX_WEARABLES; i++) | 254 | int len = m_wearables.Length; |
255 | if(len > app.m_wearables.Length) | ||
256 | len = app.m_wearables.Length; | ||
257 | |||
258 | for (int i = 0; i < len; i++) | ||
243 | { | 259 | { |
244 | for (int j = 0; j < m_wearables[i].Count; j++) | 260 | int count = m_wearables[i].Count; |
261 | if(count > app.m_wearables[i].Count) | ||
262 | count = app.m_wearables[i].Count; | ||
263 | |||
264 | for (int j = 0; j < count; j++) | ||
245 | { | 265 | { |
246 | UUID itemID = m_wearables[i][j].ItemID; | 266 | UUID itemID = m_wearables[i][j].ItemID; |
247 | UUID assetID = app.Wearables[i].GetAsset(itemID); | 267 | UUID assetID = app.Wearables[i].GetAsset(itemID); |
@@ -254,8 +274,8 @@ namespace OpenSim.Framework | |||
254 | 274 | ||
255 | public void ClearWearables() | 275 | public void ClearWearables() |
256 | { | 276 | { |
257 | m_wearables = new AvatarWearable[AvatarWearable.MAX_WEARABLES]; | 277 | m_wearables = new AvatarWearable[AvatarWearable.LEGACY_VERSION_MAX_WEARABLES]; |
258 | for (int i = 0; i < AvatarWearable.MAX_WEARABLES; i++) | 278 | for (int i = 0; i < AvatarWearable.LEGACY_VERSION_MAX_WEARABLES; i++) |
259 | m_wearables[i] = new AvatarWearable(); | 279 | m_wearables[i] = new AvatarWearable(); |
260 | } | 280 | } |
261 | 281 | ||
@@ -271,18 +291,18 @@ namespace OpenSim.Framework | |||
271 | public virtual void ResetAppearance() | 291 | public virtual void ResetAppearance() |
272 | { | 292 | { |
273 | // m_log.WarnFormat("[AVATAR APPEARANCE]: Reset appearance"); | 293 | // m_log.WarnFormat("[AVATAR APPEARANCE]: Reset appearance"); |
274 | 294 | ||
275 | m_serial = 0; | 295 | m_serial = 0; |
276 | 296 | ||
277 | SetDefaultTexture(); | 297 | SetDefaultTexture(); |
278 | 298 | ||
279 | //for (int i = 0; i < BAKE_INDICES.Length; i++) | 299 | //for (int i = 0; i < BAKE_INDICES.Length; i++) |
280 | // { | 300 | // { |
281 | // int idx = BAKE_INDICES[i]; | 301 | // int idx = BAKE_INDICES[i]; |
282 | // m_texture.FaceTextures[idx].TextureID = UUID.Zero; | 302 | // m_texture.FaceTextures[idx].TextureID = UUID.Zero; |
283 | // } | 303 | // } |
284 | } | 304 | } |
285 | 305 | ||
286 | protected virtual void SetDefaultParams() | 306 | protected virtual void SetDefaultParams() |
287 | { | 307 | { |
288 | m_visualparams = new byte[] { 33,61,85,23,58,127,63,85,63,42,0,85,63,36,85,95,153,63,34,0,63,109,88,132,63,136,81,85,103,136,127,0,150,150,150,127,0,0,0,0,0,127,0,0,255,127,114,127,99,63,127,140,127,127,0,0,0,191,0,104,0,0,0,0,0,0,0,0,0,145,216,133,0,127,0,127,170,0,0,127,127,109,85,127,127,63,85,42,150,150,150,150,150,150,150,25,150,150,150,0,127,0,0,144,85,127,132,127,85,0,127,127,127,127,127,127,59,127,85,127,127,106,47,79,127,127,204,2,141,66,0,0,127,127,0,0,0,0,127,0,159,0,0,178,127,36,85,131,127,127,127,153,95,0,140,75,27,127,127,0,150,150,198,0,0,63,30,127,165,209,198,127,127,153,204,51,51,255,255,255,204,0,255,150,150,150,150,150,150,150,150,150,150,0,150,150,150,150,150,0,127,127,150,150,150,150,150,150,150,150,0,0,150,51,132,150,150,150 }; | 308 | m_visualparams = new byte[] { 33,61,85,23,58,127,63,85,63,42,0,85,63,36,85,95,153,63,34,0,63,109,88,132,63,136,81,85,103,136,127,0,150,150,150,127,0,0,0,0,0,127,0,0,255,127,114,127,99,63,127,140,127,127,0,0,0,191,0,104,0,0,0,0,0,0,0,0,0,145,216,133,0,127,0,127,170,0,0,127,127,109,85,127,127,63,85,42,150,150,150,150,150,150,150,25,150,150,150,0,127,0,0,144,85,127,132,127,85,0,127,127,127,127,127,127,59,127,85,127,127,106,47,79,127,127,204,2,141,66,0,0,127,127,0,0,0,0,127,0,159,0,0,178,127,36,85,131,127,127,127,153,95,0,140,75,27,127,127,0,150,150,198,0,0,63,30,127,165,209,198,127,127,153,204,51,51,255,255,255,204,0,255,150,150,150,150,150,150,150,150,150,150,0,150,150,150,150,150,0,127,127,150,150,150,150,150,150,150,150,0,0,150,51,132,150,150,150 }; |
@@ -299,14 +319,14 @@ namespace OpenSim.Framework | |||
299 | public virtual void ResetBakedTextures() | 319 | public virtual void ResetBakedTextures() |
300 | { | 320 | { |
301 | SetDefaultTexture(); | 321 | SetDefaultTexture(); |
302 | 322 | ||
303 | //for (int i = 0; i < BAKE_INDICES.Length; i++) | 323 | //for (int i = 0; i < BAKE_INDICES.Length; i++) |
304 | // { | 324 | // { |
305 | // int idx = BAKE_INDICES[i]; | 325 | // int idx = BAKE_INDICES[i]; |
306 | // m_texture.FaceTextures[idx].TextureID = UUID.Zero; | 326 | // m_texture.FaceTextures[idx].TextureID = UUID.Zero; |
307 | // } | 327 | // } |
308 | } | 328 | } |
309 | 329 | ||
310 | protected virtual void SetDefaultTexture() | 330 | protected virtual void SetDefaultTexture() |
311 | { | 331 | { |
312 | m_texture = new Primitive.TextureEntry(new UUID(AppearanceManager.DEFAULT_AVATAR_TEXTURE)); | 332 | m_texture = new Primitive.TextureEntry(new UUID(AppearanceManager.DEFAULT_AVATAR_TEXTURE)); |
@@ -351,7 +371,7 @@ namespace OpenSim.Framework | |||
351 | } | 371 | } |
352 | 372 | ||
353 | m_texture = textureEntry; | 373 | m_texture = textureEntry; |
354 | 374 | ||
355 | return changed; | 375 | return changed; |
356 | } | 376 | } |
357 | 377 | ||
@@ -462,12 +482,16 @@ namespace OpenSim.Framework | |||
462 | // DEBUG ON | 482 | // DEBUG ON |
463 | // m_log.WarnFormat("[AVATARAPPEARANCE] set wearable {0} --> {1}:{2}",wearableId,wearable.ItemID,wearable.AssetID); | 483 | // m_log.WarnFormat("[AVATARAPPEARANCE] set wearable {0} --> {1}:{2}",wearableId,wearable.ItemID,wearable.AssetID); |
464 | // DEBUG OFF | 484 | // DEBUG OFF |
485 | if (wearableId >= m_wearables.Length) | ||
486 | { | ||
487 | int currentLength = m_wearables.Length; | ||
488 | Array.Resize(ref m_wearables, wearableId + 1); | ||
489 | for (int i = currentLength ; i < m_wearables.Length ; i++) | ||
490 | m_wearables[i] = new AvatarWearable(); | ||
491 | } | ||
465 | m_wearables[wearableId].Clear(); | 492 | m_wearables[wearableId].Clear(); |
466 | int count = wearable.Count; | 493 | for (int i = 0; i < wearable.Count; i++) |
467 | if (count > AvatarWearable.MAX_WEARABLES) | 494 | m_wearables[wearableId].Add(wearable[i].ItemID, wearable[i].AssetID); |
468 | count = AvatarWearable.MAX_WEARABLES; | ||
469 | for (int i = 0; i < count; i++) | ||
470 | m_wearables[wearableId].Add(wearable[i].ItemID, wearable[i].AssetID); | ||
471 | } | 495 | } |
472 | 496 | ||
473 | // DEBUG ON | 497 | // DEBUG ON |
@@ -507,14 +531,14 @@ namespace OpenSim.Framework | |||
507 | { | 531 | { |
508 | lock (m_attachments) | 532 | lock (m_attachments) |
509 | { | 533 | { |
510 | List<AvatarAttachment> alist = new List<AvatarAttachment>(); | 534 | List<AvatarAttachment> alist = new List<AvatarAttachment>(); |
511 | foreach (KeyValuePair<int, List<AvatarAttachment>> kvp in m_attachments) | 535 | foreach (KeyValuePair<int, List<AvatarAttachment>> kvp in m_attachments) |
512 | { | 536 | { |
513 | foreach (AvatarAttachment attach in kvp.Value) | 537 | foreach (AvatarAttachment attach in kvp.Value) |
514 | alist.Add(new AvatarAttachment(attach)); | 538 | alist.Add(new AvatarAttachment(attach)); |
515 | } | 539 | } |
516 | return alist; | 540 | return alist; |
517 | } | 541 | } |
518 | } | 542 | } |
519 | 543 | ||
520 | internal void AppendAttachment(AvatarAttachment attach) | 544 | internal void AppendAttachment(AvatarAttachment attach) |
@@ -527,7 +551,7 @@ namespace OpenSim.Framework | |||
527 | { | 551 | { |
528 | if (!m_attachments.ContainsKey(attach.AttachPoint)) | 552 | if (!m_attachments.ContainsKey(attach.AttachPoint)) |
529 | m_attachments[attach.AttachPoint] = new List<AvatarAttachment>(); | 553 | m_attachments[attach.AttachPoint] = new List<AvatarAttachment>(); |
530 | 554 | ||
531 | foreach (AvatarAttachment prev in m_attachments[attach.AttachPoint]) | 555 | foreach (AvatarAttachment prev in m_attachments[attach.AttachPoint]) |
532 | { | 556 | { |
533 | if (prev.ItemID == attach.ItemID) | 557 | if (prev.ItemID == attach.ItemID) |
@@ -584,7 +608,7 @@ namespace OpenSim.Framework | |||
584 | m_attachments.Remove(attachpoint); | 608 | m_attachments.Remove(attachpoint); |
585 | return true; | 609 | return true; |
586 | } | 610 | } |
587 | 611 | ||
588 | return false; | 612 | return false; |
589 | } | 613 | } |
590 | 614 | ||
@@ -598,13 +622,13 @@ namespace OpenSim.Framework | |||
598 | if (existingAttachment != null) | 622 | if (existingAttachment != null) |
599 | { | 623 | { |
600 | // m_log.DebugFormat( | 624 | // m_log.DebugFormat( |
601 | // "[AVATAR APPEARANCE]: Found existing attachment for {0}, asset {1} at point {2}", | 625 | // "[AVATAR APPEARANCE]: Found existing attachment for {0}, asset {1} at point {2}", |
602 | // existingAttachment.ItemID, existingAttachment.AssetID, existingAttachment.AttachPoint); | 626 | // existingAttachment.ItemID, existingAttachment.AssetID, existingAttachment.AttachPoint); |
603 | 627 | ||
604 | if (existingAttachment.AssetID != UUID.Zero && existingAttachment.AttachPoint == (attachpoint & 0x7F)) | 628 | if (existingAttachment.AssetID != UUID.Zero && existingAttachment.AttachPoint == (attachpoint & 0x7F)) |
605 | { | 629 | { |
606 | m_log.DebugFormat( | 630 | m_log.DebugFormat( |
607 | "[AVATAR APPEARANCE]: Ignoring attempt to attach an already attached item {0} at point {1}", | 631 | "[AVATAR APPEARANCE]: Ignoring attempt to attach an already attached item {0} at point {1}", |
608 | item, attachpoint); | 632 | item, attachpoint); |
609 | 633 | ||
610 | return false; | 634 | return false; |
@@ -616,7 +640,7 @@ namespace OpenSim.Framework | |||
616 | DetachAttachment(existingAttachment.ItemID); | 640 | DetachAttachment(existingAttachment.ItemID); |
617 | } | 641 | } |
618 | } | 642 | } |
619 | 643 | ||
620 | // check if this is an append or a replace, 0x80 marks it as an append | 644 | // check if this is an append or a replace, 0x80 marks it as an append |
621 | if ((attachpoint & 0x80) > 0) | 645 | if ((attachpoint & 0x80) > 0) |
622 | { | 646 | { |
@@ -677,16 +701,16 @@ namespace OpenSim.Framework | |||
677 | if (index >= 0) | 701 | if (index >= 0) |
678 | { | 702 | { |
679 | // m_log.DebugFormat( | 703 | // m_log.DebugFormat( |
680 | // "[AVATAR APPEARANCE]: Detaching attachment {0}, index {1}, point {2}", | 704 | // "[AVATAR APPEARANCE]: Detaching attachment {0}, index {1}, point {2}", |
681 | // m_attachments[kvp.Key][index].ItemID, index, m_attachments[kvp.Key][index].AttachPoint); | 705 | // m_attachments[kvp.Key][index].ItemID, index, m_attachments[kvp.Key][index].AttachPoint); |
682 | 706 | ||
683 | // Remove it from the list of attachments at that attach point | 707 | // Remove it from the list of attachments at that attach point |
684 | m_attachments[kvp.Key].RemoveAt(index); | 708 | m_attachments[kvp.Key].RemoveAt(index); |
685 | 709 | ||
686 | // And remove the list if there are no more attachments here | 710 | // And remove the list if there are no more attachments here |
687 | if (m_attachments[kvp.Key].Count == 0) | 711 | if (m_attachments[kvp.Key].Count == 0) |
688 | m_attachments.Remove(kvp.Key); | 712 | m_attachments.Remove(kvp.Key); |
689 | 713 | ||
690 | return true; | 714 | return true; |
691 | } | 715 | } |
692 | } | 716 | } |
@@ -706,7 +730,7 @@ namespace OpenSim.Framework | |||
706 | /// <summary> | 730 | /// <summary> |
707 | /// Create an OSDMap from the appearance data | 731 | /// Create an OSDMap from the appearance data |
708 | /// </summary> | 732 | /// </summary> |
709 | public OSDMap Pack() | 733 | public OSDMap Pack(EntityTransferContext ctx) |
710 | { | 734 | { |
711 | OSDMap data = new OSDMap(); | 735 | OSDMap data = new OSDMap(); |
712 | 736 | ||
@@ -714,16 +738,22 @@ namespace OpenSim.Framework | |||
714 | data["height"] = OSD.FromReal(m_avatarHeight); | 738 | data["height"] = OSD.FromReal(m_avatarHeight); |
715 | 739 | ||
716 | // Wearables | 740 | // Wearables |
741 | // | ||
742 | // This will send as many or as few wearables as we have, unless a count | ||
743 | // is given. Used for legacy (pre 0.4) versions. | ||
744 | int count = ctx.WearablesCount; | ||
745 | if (ctx.WearablesCount == -1) | ||
746 | count = m_wearables.Length; | ||
747 | OSDArray wears = new OSDArray(count); | ||
748 | for (int i = 0; i < count; i++) | ||
749 | { | ||
750 | AvatarWearable dummyWearable = new AvatarWearable(); | ||
717 | 751 | ||
718 | int wearsCount; | 752 | if (i < m_wearables.Length) |
719 | if(PackLegacyWearables) | 753 | wears.Add(m_wearables[i].Pack()); |
720 | wearsCount = AvatarWearable.LEGACY_VERSION_MAX_WEARABLES; | 754 | else |
721 | else | 755 | wears.Add(dummyWearable.Pack()); |
722 | wearsCount = AvatarWearable.MAX_WEARABLES; | 756 | } |
723 | |||
724 | OSDArray wears = new OSDArray(wearsCount); | ||
725 | for (int i = 0; i < wearsCount; i++) | ||
726 | wears.Add(m_wearables[i].Pack()); | ||
727 | data["wearables"] = wears; | 757 | data["wearables"] = wears; |
728 | 758 | ||
729 | // Avatar Textures | 759 | // Avatar Textures |
@@ -737,6 +767,13 @@ namespace OpenSim.Framework | |||
737 | } | 767 | } |
738 | data["textures"] = textures; | 768 | data["textures"] = textures; |
739 | 769 | ||
770 | if (m_cacheitems != null) | ||
771 | { | ||
772 | OSDArray baked = WearableCacheItem.BakedToOSD(m_cacheitems); | ||
773 | if (baked != null) | ||
774 | data["bakedcache"] = baked; | ||
775 | } | ||
776 | |||
740 | // Visual Parameters | 777 | // Visual Parameters |
741 | OSDBinary visualparams = new OSDBinary(m_visualparams); | 778 | OSDBinary visualparams = new OSDBinary(m_visualparams); |
742 | data["visualparams"] = visualparams; | 779 | data["visualparams"] = visualparams; |
@@ -774,8 +811,8 @@ namespace OpenSim.Framework | |||
774 | OSDArray wears = (OSDArray)(data["wearables"]); | 811 | OSDArray wears = (OSDArray)(data["wearables"]); |
775 | 812 | ||
776 | int count = wears.Count; | 813 | int count = wears.Count; |
777 | if (count > AvatarWearable.MAX_WEARABLES) | 814 | |
778 | count = AvatarWearable.MAX_WEARABLES; | 815 | m_wearables = new AvatarWearable[count]; |
779 | 816 | ||
780 | for (int i = 0; i < count; i++) | 817 | for (int i = 0; i < count; i++) |
781 | m_wearables[i] = new AvatarWearable((OSDArray)wears[i]); | 818 | m_wearables[i] = new AvatarWearable((OSDArray)wears[i]); |
@@ -803,6 +840,12 @@ namespace OpenSim.Framework | |||
803 | m_log.Warn("[AVATAR APPEARANCE]: failed to unpack textures"); | 840 | m_log.Warn("[AVATAR APPEARANCE]: failed to unpack textures"); |
804 | } | 841 | } |
805 | 842 | ||
843 | if ((data != null) && (data["bakedcache"] != null) && (data["bakedcache"]).Type == OSDType.Array) | ||
844 | { | ||
845 | OSDArray bakedOSDArray = (OSDArray)(data["bakedcache"]); | ||
846 | m_cacheitems = WearableCacheItem.BakedFromOSD(bakedOSDArray); | ||
847 | } | ||
848 | |||
806 | // Visual Parameters | 849 | // Visual Parameters |
807 | SetDefaultParams(); | 850 | SetDefaultParams(); |
808 | if ((data != null) && (data["visualparams"] != null)) | 851 | if ((data != null) && (data["visualparams"] != null)) |
@@ -824,7 +867,7 @@ namespace OpenSim.Framework | |||
824 | { | 867 | { |
825 | AvatarAttachment att = new AvatarAttachment((OSDMap)attachs[i]); | 868 | AvatarAttachment att = new AvatarAttachment((OSDMap)attachs[i]); |
826 | AppendAttachment(att); | 869 | AppendAttachment(att); |
827 | 870 | ||
828 | // m_log.DebugFormat( | 871 | // m_log.DebugFormat( |
829 | // "[AVATAR APPEARANCE]: Unpacked attachment itemID {0}, assetID {1}, point {2}", | 872 | // "[AVATAR APPEARANCE]: Unpacked attachment itemID {0}, assetID {1}, point {2}", |
830 | // att.ItemID, att.AssetID, att.AttachPoint); | 873 | // att.ItemID, att.AssetID, att.AttachPoint); |
@@ -1601,14 +1644,14 @@ namespace OpenSim.Framework | |||
1601 | SHAPE_EYELID_INNER_CORNER_UP = 214, | 1644 | SHAPE_EYELID_INNER_CORNER_UP = 214, |
1602 | SKIRT_SKIRT_RED = 215, | 1645 | SKIRT_SKIRT_RED = 215, |
1603 | SKIRT_SKIRT_GREEN = 216, | 1646 | SKIRT_SKIRT_GREEN = 216, |
1604 | SKIRT_SKIRT_BLUE = 217, | 1647 | SKIRT_SKIRT_BLUE = 217, |
1605 | 1648 | ||
1606 | /// <summary> | 1649 | /// <summary> |
1607 | /// Avatar Physics section. These are 0 type visual params which get transmitted. | 1650 | /// Avatar Physics section. These are 0 type visual params which get transmitted. |
1608 | /// </summary> | 1651 | /// </summary> |
1609 | 1652 | ||
1610 | /// <summary> | 1653 | /// <summary> |
1611 | /// Breast Part 1 | 1654 | /// Breast Part 1 |
1612 | /// </summary> | 1655 | /// </summary> |
1613 | BREAST_PHYSICS_MASS = 218, | 1656 | BREAST_PHYSICS_MASS = 218, |
1614 | BREAST_PHYSICS_GRAVITY = 219, | 1657 | BREAST_PHYSICS_GRAVITY = 219, |
@@ -1652,7 +1695,12 @@ namespace OpenSim.Framework | |||
1652 | BREAST_PHYSICS_LEFTRIGHT_MAX_EFFECT = 247, | 1695 | BREAST_PHYSICS_LEFTRIGHT_MAX_EFFECT = 247, |
1653 | BREAST_PHYSICS_LEFTRIGHT_SPRING= 248, | 1696 | BREAST_PHYSICS_LEFTRIGHT_SPRING= 248, |
1654 | BREAST_PHYSICS_LEFTRIGHT_GAIN = 249, | 1697 | BREAST_PHYSICS_LEFTRIGHT_GAIN = 249, |
1655 | BREAST_PHYSICS_LEFTRIGHT_DAMPING = 250 | 1698 | BREAST_PHYSICS_LEFTRIGHT_DAMPING = 250, |
1699 | |||
1700 | // Ubit: 07/96/2013 new parameters | ||
1701 | _APPEARANCEMESSAGE_VERSION = 251, //ID 11000 | ||
1702 | |||
1703 | SHAPE_HOVER = 252, //ID 11001 | ||
1656 | } | 1704 | } |
1657 | #endregion | 1705 | #endregion |
1658 | } | 1706 | } |