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)
{
sp.ClearAttachments();
m_log.Info(noteCardContend);
m_log.Info("[" + Name + "] Info: Deserialize notecard.");
OSDMap appearanceOsd = (OSDMap)OSDParser.DeserializeLLSDXml(noteCardContend);
AvatarAppearance appearance = new AvatarAppearance();
appearance.Unpack(appearanceOsd);
sp.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.SendAppearanceToAgent(sp);
sp.SendAppearanceToAllOtherAgents();