aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/AvatarAppearance.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Framework/AvatarAppearance.cs39
1 files changed, 27 insertions, 12 deletions
diff --git a/OpenSim/Framework/AvatarAppearance.cs b/OpenSim/Framework/AvatarAppearance.cs
index c69dde3..21e2233 100644
--- a/OpenSim/Framework/AvatarAppearance.cs
+++ b/OpenSim/Framework/AvatarAppearance.cs
@@ -245,6 +245,21 @@ namespace OpenSim.Framework
245// } 245// }
246 } 246 }
247 247
248 /// <summary>
249 /// Invalidate all of the baked textures in the appearance, useful
250 /// if you know that none are valid
251 /// </summary>
252 public virtual void ResetBakedTextures()
253 {
254 SetDefaultTexture();
255
256 //for (int i = 0; i < BAKE_INDICES.Length; i++)
257 // {
258 // int idx = BAKE_INDICES[i];
259 // m_texture.FaceTextures[idx].TextureID = UUID.Zero;
260 // }
261 }
262
248 protected virtual void SetDefaultTexture() 263 protected virtual void SetDefaultTexture()
249 { 264 {
250 m_texture = new Primitive.TextureEntry(new UUID(AppearanceManager.DEFAULT_AVATAR_TEXTURE)); 265 m_texture = new Primitive.TextureEntry(new UUID(AppearanceManager.DEFAULT_AVATAR_TEXTURE));
@@ -390,19 +405,18 @@ namespace OpenSim.Framework
390 /// </remarks> 405 /// </remarks>
391 public List<AvatarAttachment> GetAttachments() 406 public List<AvatarAttachment> GetAttachments()
392 { 407 {
393 List<AvatarAttachment> alist = new List<AvatarAttachment>(); 408
394 409
395 lock (m_attachments) 410 lock (m_attachments)
396 { 411 {
412 List<AvatarAttachment> alist = new List<AvatarAttachment>();
397 foreach (KeyValuePair<int, List<AvatarAttachment>> kvp in m_attachments) 413 foreach (KeyValuePair<int, List<AvatarAttachment>> kvp in m_attachments)
398 { 414 {
399 foreach (AvatarAttachment attach in kvp.Value) 415 foreach (AvatarAttachment attach in kvp.Value)
400 alist.Add(new AvatarAttachment(attach)); 416 alist.Add(new AvatarAttachment(attach));
401 } 417 }
402 } 418 return alist;
403 419 } }
404 return alist;
405 }
406 420
407 internal void AppendAttachment(AvatarAttachment attach) 421 internal void AppendAttachment(AvatarAttachment attach)
408 { 422 {
@@ -531,7 +545,6 @@ namespace OpenSim.Framework
531 return kvp.Key; 545 return kvp.Key;
532 } 546 }
533 } 547 }
534
535 return 0; 548 return 0;
536 } 549 }
537 550
@@ -599,12 +612,14 @@ namespace OpenSim.Framework
599 OSDBinary visualparams = new OSDBinary(m_visualparams); 612 OSDBinary visualparams = new OSDBinary(m_visualparams);
600 data["visualparams"] = visualparams; 613 data["visualparams"] = visualparams;
601 614
602 // Attachments 615 lock (m_attachments)
603 List<AvatarAttachment> attachments = GetAttachments(); 616 {
604 OSDArray attachs = new OSDArray(attachments.Count); 617 // Attachments
605 foreach (AvatarAttachment attach in GetAttachments()) 618 OSDArray attachs = new OSDArray(m_attachments.Count);
606 attachs.Add(attach.Pack()); 619 foreach (AvatarAttachment attach in GetAttachments())
607 data["attachments"] = attachs; 620 attachs.Add(attach.Pack());
621 data["attachments"] = attachs;
622 }
608 623
609 return data; 624 return data;
610 } 625 }