*DANGER* dont send baked textures assets to Neighbours. Possible we could

send a lot less
avinationmerge
UbitUmarov 2014-08-14 02:36:50 +01:00
parent a1cc218f10
commit 395903d58f
2 changed files with 16 additions and 5 deletions

View File

@ -183,11 +183,16 @@ namespace OpenSim.Framework
m_attachments = new Dictionary<int, List<AvatarAttachment>>();
}
public AvatarAppearance(AvatarAppearance appearance): this(appearance, true)
public AvatarAppearance(AvatarAppearance appearance): this(appearance, true,true)
{
}
public AvatarAppearance(AvatarAppearance appearance, bool copyWearables)
: this(appearance, copyWearables, true)
{
}
public AvatarAppearance(AvatarAppearance appearance, bool copyWearables, bool copyBaked)
{
// m_log.WarnFormat("[AVATAR APPEARANCE] create from an existing appearance");
@ -221,8 +226,10 @@ namespace OpenSim.Framework
{
byte[] tbytes = appearance.Texture.GetBytes();
m_texture = new Primitive.TextureEntry(tbytes,0,tbytes.Length);
if (appearance.m_cacheitems != null)
if (copyBaked && appearance.m_cacheitems != null)
m_cacheitems = (WearableCacheItem[])appearance.m_cacheitems.Clone();
else
m_cacheitems = null;
}
m_visualparams = null;

View File

@ -1832,7 +1832,10 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
agent.InventoryFolder = UUID.Zero;
agent.startpos = new Vector3(128, 128, 70);
agent.child = true;
agent.Appearance = sp.Appearance;
//agent.Appearance = sp.Appearance;
agent.Appearance = new AvatarAppearance(sp.Appearance, true, false); // guess this should be a lot less
agent.CapsPath = CapsUtil.GetRandomCapsObjectPath();
agent.ChildrenCapSeeds = new Dictionary<ulong, string>(sp.Scene.CapsModule.GetChildrenSeeds(sp.UUID));
@ -1947,7 +1950,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
agent.InventoryFolder = UUID.Zero;
agent.startpos = sp.AbsolutePosition + CalculateOffset(sp, neighbour);
agent.child = true;
agent.Appearance = sp.Appearance;
// agent.Appearance = sp.Appearance;
agent.Appearance = new AvatarAppearance(sp.Appearance, true, false); // guess this should be a lot less
if (currentAgentCircuit != null)
{
agent.ServiceURLs = currentAgentCircuit.ServiceURLs;