use avatarFactory

master
Christopher 2020-07-10 19:38:06 +02:00
parent a2d3869e0f
commit eff1694e40
1 changed files with 4 additions and 2 deletions

View File

@ -99,17 +99,19 @@ namespace OpenSim.Modules.Appearance2Avatar
foreach (SceneObjectGroup _attachment in _allAttachments)
m_scene.AttachmentsModule.DetachSingleAttachmentToInv(sp, _attachment);
//Load Appearance
m_log.Info(noteCardContend);
m_log.Info("[" + Name + "] Info: Deserialize notecard.");
OSDMap appearanceOsd = (OSDMap)OSDParser.DeserializeLLSDXml(noteCardContend);
sp.Appearance.Unpack(appearanceOsd);
AvatarAppearance _appearance = new AvatarAppearance(appearanceOsd);
m_scene.AvatarFactory.SetAppearance(sp, _appearance, null);
m_scene.AvatarService.SetAppearance(sp.UUID, _appearance);
//Send Update
m_log.Info("[" + Name + "] Info: Send update to all clients");
foreach (ScenePresence presens in m_scene.GetScenePresences())
presens.ControllingClient.SendAppearance(presens.UUID, sp.Appearance.VisualParams, sp.Appearance.Texture.GetBakesBytes(), sp.Appearance.AvatarPreferencesHoverZ);
}
}
else