aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/AvatarAppearance.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Framework/AvatarAppearance.cs26
1 files changed, 21 insertions, 5 deletions
diff --git a/OpenSim/Framework/AvatarAppearance.cs b/OpenSim/Framework/AvatarAppearance.cs
index a3ea499..5da8ba1 100644
--- a/OpenSim/Framework/AvatarAppearance.cs
+++ b/OpenSim/Framework/AvatarAppearance.cs
@@ -69,7 +69,7 @@ namespace OpenSim.Framework
69 private static UUID HAIR_ASSET = new UUID("d342e6c0-b9d2-11dc-95ff-0800200c9a66"); 69 private static UUID HAIR_ASSET = new UUID("d342e6c0-b9d2-11dc-95ff-0800200c9a66");
70 private static UUID HAIR_ITEM = new UUID("d342e6c1-b9d2-11dc-95ff-0800200c9a66"); 70 private static UUID HAIR_ITEM = new UUID("d342e6c1-b9d2-11dc-95ff-0800200c9a66");
71 71
72 public readonly static int VISUALPARAM_COUNT = 218; 72 public readonly static int VISUALPARAM_COUNT = 218;
73 73
74 protected UUID m_owner; 74 protected UUID m_owner;
75 75
@@ -361,7 +361,7 @@ namespace OpenSim.Framework
361 // This sets Visual Params with *less* weirder values then default. Instead of a ugly alien, it looks like a fat scientist 361 // This sets Visual Params with *less* weirder values then default. Instead of a ugly alien, it looks like a fat scientist
362 SetDefaultParams(m_visualparams); 362 SetDefaultParams(m_visualparams);
363 SetDefaultWearables(); 363 SetDefaultWearables();
364 m_texture = GetDefaultTexture(); 364 m_texture = GetDefaultTexture();
365 } 365 }
366 366
367 public AvatarAppearance(UUID avatarID, AvatarWearable[] wearables, byte[] visualParams) 367 public AvatarAppearance(UUID avatarID, AvatarWearable[] wearables, byte[] visualParams)
@@ -390,11 +390,12 @@ namespace OpenSim.Framework
390 + 0.08f * (float)m_visualparams[(int)VPElement.SHOES_PLATFORM_HEIGHT] / 255.0f // Shoe platform height 390 + 0.08f * (float)m_visualparams[(int)VPElement.SHOES_PLATFORM_HEIGHT] / 255.0f // Shoe platform height
391 + 0.07f * (float)m_visualparams[(int)VPElement.SHOES_HEEL_HEIGHT] / 255.0f // Shoe heel height 391 + 0.07f * (float)m_visualparams[(int)VPElement.SHOES_HEEL_HEIGHT] / 255.0f // Shoe heel height
392 + 0.076f * (float)m_visualparams[(int)VPElement.SHAPE_NECK_LENGTH] / 255.0f; // Neck length 392 + 0.076f * (float)m_visualparams[(int)VPElement.SHAPE_NECK_LENGTH] / 255.0f; // Neck length
393 m_hipOffset = (0.615385f // Half of avatar 393 m_hipOffset = (((1.23077f // Half of avatar
394 + 0.516945f * (float)m_visualparams[(int)VPElement.SHAPE_HEIGHT] / 255.0f // Body height
395 + 0.3836f * (float)m_visualparams[(int)VPElement.SHAPE_LEG_LENGTH] / 255.0f // Leg length
394 + 0.08f * (float)m_visualparams[(int)VPElement.SHOES_PLATFORM_HEIGHT] / 255.0f // Shoe platform height 396 + 0.08f * (float)m_visualparams[(int)VPElement.SHOES_PLATFORM_HEIGHT] / 255.0f // Shoe platform height
395 + 0.07f * (float)m_visualparams[(int)VPElement.SHOES_HEEL_HEIGHT] / 255.0f // Shoe heel height 397 + 0.07f * (float)m_visualparams[(int)VPElement.SHOES_HEEL_HEIGHT] / 255.0f // Shoe heel height
396 + 0.3836f * (float)m_visualparams[(int)VPElement.SHAPE_LEG_LENGTH] / 255.0f // Leg length 398 ) / 2) - m_avatarHeight / 2) * 0.31f - 0.0425f;
397 - m_avatarHeight / 2) * 0.3f - 0.04f;
398 399
399 400
400 401
@@ -558,6 +559,16 @@ namespace OpenSim.Framework
558 559
559 private Dictionary<int, UUID[]> m_attachments = new Dictionary<int, UUID[]>(); 560 private Dictionary<int, UUID[]> m_attachments = new Dictionary<int, UUID[]>();
560 561
562 public void SetAttachments(AttachmentData[] data)
563 {
564 foreach (AttachmentData a in data)
565 {
566 m_attachments[a.AttachPoint] = new UUID[2];
567 m_attachments[a.AttachPoint][0] = a.ItemID;
568 m_attachments[a.AttachPoint][1] = a.AssetID;
569 }
570 }
571
561 public void SetAttachments(Hashtable data) 572 public void SetAttachments(Hashtable data)
562 { 573 {
563 m_attachments.Clear(); 574 m_attachments.Clear();
@@ -587,6 +598,11 @@ namespace OpenSim.Framework
587 } 598 }
588 } 599 }
589 600
601 public Dictionary<int, UUID[]> GetAttachmentDictionary()
602 {
603 return m_attachments;
604 }
605
590 public Hashtable GetAttachments() 606 public Hashtable GetAttachments()
591 { 607 {
592 if (m_attachments.Count == 0) 608 if (m_attachments.Count == 0)