Makes SP.CopyFrom a bit more robust with respect to sims in older versions which still don't have the new appearance management code.

0.6.3-post-fixes
diva 2009-02-17 23:46:19 +00:00
parent 33331167b5
commit c381bee515
1 changed files with 4 additions and 6 deletions

View File

@ -2678,10 +2678,10 @@ namespace OpenSim.Region.Framework.Scenes
m_setAlwaysRun = cAgent.AlwaysRun;
uint i = 0;
AvatarWearable[] wearables = new AvatarWearable[cAgent.AgentTextures.Length / 2];
Primitive.TextureEntry te = new Primitive.TextureEntry(UUID.Random());
try
{
AvatarWearable[] wearables = new AvatarWearable[cAgent.AgentTextures.Length / 2];
Primitive.TextureEntry te = new Primitive.TextureEntry(UUID.Random());
for (uint n = 0; n < cAgent.AgentTextures.Length; n += 2)
{
UUID itemId = cAgent.AgentTextures[n];
@ -2689,15 +2689,13 @@ namespace OpenSim.Region.Framework.Scenes
wearables[i] = new AvatarWearable(itemId, assetId);
te.CreateFace(i++).TextureID = assetId;
}
m_appearance.Wearables = wearables;
m_appearance.SetAppearance(te.ToBytes(), new List<byte>(cAgent.VisualParams));
}
catch (Exception e)
{
m_log.Warn("[SCENE PRESENCE]: exception in CopyFrom " + e.Message);
}
//m_appearance.Texture = te;
m_appearance.Wearables = wearables;
//m_appearance.VisualParams = cAgent.VisualParams;
m_appearance.SetAppearance(te.ToBytes(), new List<byte>(cAgent.VisualParams));
//cAgent.GroupID = ??
//Groups???