clear attachments

master
Christopher 2020-07-10 18:41:42 +02:00
parent e5483e62ba
commit 7aa8d37ce0
1 changed files with 5 additions and 6 deletions

View File

@ -94,16 +94,15 @@ namespace OpenSim.Modules.Appearance2Avatar
if(noteCardContend != null) if(noteCardContend != null)
{ {
sp.ClearAttachments();
m_log.Info(noteCardContend); m_log.Info(noteCardContend);
m_log.Info("[" + Name + "] Info: Deserialize notecard."); m_log.Info("[" + Name + "] Info: Deserialize notecard.");
OSDMap appearanceOsd = (OSDMap)OSDParser.DeserializeLLSDXml(noteCardContend); OSDMap appearanceOsd = (OSDMap)OSDParser.DeserializeLLSDXml(noteCardContend);
AvatarAppearance appearance = new AvatarAppearance(); sp.Appearance.Unpack(appearanceOsd);
appearance.Unpack(appearanceOsd);
m_log.Info("[" + Name + "] Info: Overwrite appearance");
sp.Appearance = appearance;
m_log.Info("[" + Name + "] Info: Send update to clients"); m_log.Info("[" + Name + "] Info: Send update to all clients");
sp.SendAvatarDataToAllAgents(); sp.SendAvatarDataToAllAgents();
sp.SendAppearanceToAgent(sp); sp.SendAppearanceToAgent(sp);
sp.SendAppearanceToAllOtherAgents(); sp.SendAppearanceToAllOtherAgents();