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 72b580b..f147e14 100644
--- a/OpenSim/Framework/AvatarAppearance.cs
+++ b/OpenSim/Framework/AvatarAppearance.cs
@@ -247,6 +247,21 @@ namespace OpenSim.Framework
247// } 247// }
248 } 248 }
249 249
250 /// <summary>
251 /// Invalidate all of the baked textures in the appearance, useful
252 /// if you know that none are valid
253 /// </summary>
254 public virtual void ResetBakedTextures()
255 {
256 SetDefaultTexture();
257
258 //for (int i = 0; i < BAKE_INDICES.Length; i++)
259 // {
260 // int idx = BAKE_INDICES[i];
261 // m_texture.FaceTextures[idx].TextureID = UUID.Zero;
262 // }
263 }
264
250 protected virtual void SetDefaultTexture() 265 protected virtual void SetDefaultTexture()
251 { 266 {
252 m_texture = new Primitive.TextureEntry(new UUID(AppearanceManager.DEFAULT_AVATAR_TEXTURE)); 267 m_texture = new Primitive.TextureEntry(new UUID(AppearanceManager.DEFAULT_AVATAR_TEXTURE));
@@ -392,19 +407,18 @@ namespace OpenSim.Framework
392 /// </remarks> 407 /// </remarks>
393 public List<AvatarAttachment> GetAttachments() 408 public List<AvatarAttachment> GetAttachments()
394 { 409 {
395 List<AvatarAttachment> alist = new List<AvatarAttachment>(); 410
396 411
397 lock (m_attachments) 412 lock (m_attachments)
398 { 413 {
414 List<AvatarAttachment> alist = new List<AvatarAttachment>();
399 foreach (KeyValuePair<int, List<AvatarAttachment>> kvp in m_attachments) 415 foreach (KeyValuePair<int, List<AvatarAttachment>> kvp in m_attachments)
400 { 416 {
401 foreach (AvatarAttachment attach in kvp.Value) 417 foreach (AvatarAttachment attach in kvp.Value)
402 alist.Add(new AvatarAttachment(attach)); 418 alist.Add(new AvatarAttachment(attach));
403 } 419 }
404 } 420 return alist;
405 421 } }
406 return alist;
407 }
408 422
409 internal void AppendAttachment(AvatarAttachment attach) 423 internal void AppendAttachment(AvatarAttachment attach)
410 { 424 {
@@ -533,7 +547,6 @@ namespace OpenSim.Framework
533 return kvp.Key; 547 return kvp.Key;
534 } 548 }
535 } 549 }
536
537 return 0; 550 return 0;
538 } 551 }
539 552
@@ -601,12 +614,14 @@ namespace OpenSim.Framework
601 OSDBinary visualparams = new OSDBinary(m_visualparams); 614 OSDBinary visualparams = new OSDBinary(m_visualparams);
602 data["visualparams"] = visualparams; 615 data["visualparams"] = visualparams;
603 616
604 // Attachments 617 lock (m_attachments)
605 List<AvatarAttachment> attachments = GetAttachments(); 618 {
606 OSDArray attachs = new OSDArray(attachments.Count); 619 // Attachments
607 foreach (AvatarAttachment attach in GetAttachments()) 620 OSDArray attachs = new OSDArray(m_attachments.Count);
608 attachs.Add(attach.Pack()); 621 foreach (AvatarAttachment attach in GetAttachments())
609 data["attachments"] = attachs; 622 attachs.Add(attach.Pack());
623 data["attachments"] = attachs;
624 }
610 625
611 return data; 626 return data;
612 } 627 }