Browse Source

do not store HUDs on appearence notecards

UbitUmarov 4 years ago
parent
commit
873b3b0af6
1 changed files with 7 additions and 1 deletions
  1. 7 1
      OpenSim/Framework/AvatarAppearance.cs

+ 7 - 1
OpenSim/Framework/AvatarAppearance.cs

@@ -817,7 +817,7 @@ namespace OpenSim.Framework
             return data;
         }
 
-        public OSDMap PackForNotecard()
+        public OSDMap PackForNotecard(bool NoHuds = true)
         {
             OSDMap data = new OSDMap();
 
@@ -868,7 +868,13 @@ namespace OpenSim.Framework
                 // Attachments
                 OSDArray attachs = new OSDArray(m_attachments.Count);
                 foreach (AvatarAttachment attach in GetAttachments())
+                {
+                    if (NoHuds &&
+                            attach.AttachPoint >= (uint)AttachmentPoint.HUDCenter2 &&
+                            attach.AttachPoint <= (uint)AttachmentPoint.HUDBottomRight)
+                        continue;
                     attachs.Add(attach.Pack());
+                }
                 data["attachments"] = attachs;
             }