diff --git a/src/Appearance2Avatar.cs b/src/Appearance2Avatar.cs index bd19671..23b6474 100644 --- a/src/Appearance2Avatar.cs +++ b/src/Appearance2Avatar.cs @@ -97,7 +97,7 @@ namespace OpenSim.Modules.Appearance2Avatar //Remove all attachments List _allAttachments = sp.GetAttachments(); foreach (SceneObjectGroup _attachment in _allAttachments) - sp.RemoveAttachment(_attachment); + m_scene.AttachmentsModule.DetachSingleAttachmentToInv(sp, _attachment); //Load Appearance m_log.Info(noteCardContend); @@ -105,15 +105,11 @@ namespace OpenSim.Modules.Appearance2Avatar OSDMap appearanceOsd = (OSDMap)OSDParser.DeserializeLLSDXml(noteCardContend); sp.Appearance.Unpack(appearanceOsd); + //Send Update m_log.Info("[" + Name + "] Info: Send update to all clients"); - List _allNewAttachments = sp.GetAttachments(); - foreach (SceneObjectGroup _attachment in _allAttachments) - sp.SendAttachmentUpdate(_attachment, PrimUpdateFlags.FullUpdate); + foreach (ScenePresence presens in m_scene.GetScenePresences()) + presens.ControllingClient.SendAppearance(presens.UUID, sp.Appearance.VisualParams, sp.Appearance.Texture.GetBakesBytes(), sp.Appearance.AvatarPreferencesHoverZ); - sp.SendInitialAvatarDataToAgent(sp); - sp.SendAvatarDataToAllAgents(); - sp.SendAppearanceToAgent(sp); - sp.SendAppearanceToAllOtherAgents(); } } else