Makes SP.CopyFrom a bit more robust with respect to sims in older versions which still don't have the new appearance management code.
parent
33331167b5
commit
c381bee515
|
@ -2678,10 +2678,10 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
m_setAlwaysRun = cAgent.AlwaysRun;
|
m_setAlwaysRun = cAgent.AlwaysRun;
|
||||||
|
|
||||||
uint i = 0;
|
uint i = 0;
|
||||||
AvatarWearable[] wearables = new AvatarWearable[cAgent.AgentTextures.Length / 2];
|
|
||||||
Primitive.TextureEntry te = new Primitive.TextureEntry(UUID.Random());
|
|
||||||
try
|
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)
|
for (uint n = 0; n < cAgent.AgentTextures.Length; n += 2)
|
||||||
{
|
{
|
||||||
UUID itemId = cAgent.AgentTextures[n];
|
UUID itemId = cAgent.AgentTextures[n];
|
||||||
|
@ -2689,15 +2689,13 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
wearables[i] = new AvatarWearable(itemId, assetId);
|
wearables[i] = new AvatarWearable(itemId, assetId);
|
||||||
te.CreateFace(i++).TextureID = assetId;
|
te.CreateFace(i++).TextureID = assetId;
|
||||||
}
|
}
|
||||||
|
m_appearance.Wearables = wearables;
|
||||||
|
m_appearance.SetAppearance(te.ToBytes(), new List<byte>(cAgent.VisualParams));
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
m_log.Warn("[SCENE PRESENCE]: exception in CopyFrom " + e.Message);
|
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 = ??
|
//cAgent.GroupID = ??
|
||||||
//Groups???
|
//Groups???
|
||||||
|
|
Loading…
Reference in New Issue