add objekts

master
Christopher 2020-07-10 19:50:36 +02:00
parent 74c252a4aa
commit d97aea9ac9
1 changed files with 5 additions and 1 deletions

View File

@ -29,6 +29,7 @@ namespace OpenSim.Modules.Appearance2Avatar
private IScriptModuleComms m_scriptModule = null; private IScriptModuleComms m_scriptModule = null;
public static Scene m_scene = null; public static Scene m_scene = null;
private IAssetCache m_assetCache = null;
public string Name public string Name
{ {
@ -63,6 +64,8 @@ namespace OpenSim.Modules.Appearance2Avatar
m_scriptModule.RegisterScriptInvocation(this, "osAppearance2Avatar"); m_scriptModule.RegisterScriptInvocation(this, "osAppearance2Avatar");
} }
m_assetCache = scene.RequestModuleInterface<IAssetCache>();
m_scene = scene; m_scene = scene;
} }
@ -105,7 +108,8 @@ namespace OpenSim.Modules.Appearance2Avatar
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(appearanceOsd); AvatarAppearance _appearance = new AvatarAppearance(appearanceOsd);
m_scene.AvatarFactory.SetAppearance(sp, _appearance, null);
m_scene.AvatarFactory.SetAppearance(sp, _appearance, WearableCacheItem.FromOSD(appearanceOsd, m_assetCache));
m_scene.AvatarService.SetAppearance(sp.UUID, _appearance); m_scene.AvatarService.SetAppearance(sp.UUID, _appearance);
//Send Update //Send Update