mirror of
https://github.com/opensim/opensim.git
synced 2026-08-06 01:06:30 +08:00
* Change the signature of the agent set appearance callback to prevent unnecessary serialization/deserialization of TextureEntry objects and allow TextureEntry to be inspected for missing bakes
* Inspect incoming TextureEntry updates for bakes that do not exist on the simulator and request the missing textures * Properly handle appearance updates that do not have a TextureEntry set
This commit is contained in:
@@ -380,13 +380,13 @@ namespace OpenSim.Framework
|
||||
/// <summary>
|
||||
/// Set up appearance textures and avatar parameters, including a height calculation
|
||||
/// </summary>
|
||||
/// <param name="texture"></param>
|
||||
/// <param name="visualParam"></param>
|
||||
public virtual void SetAppearance(byte[] texture, List<byte> visualParam)
|
||||
public virtual void SetAppearance(Primitive.TextureEntry textureEntry, byte[] visualParams)
|
||||
{
|
||||
Primitive.TextureEntry textureEnt = new Primitive.TextureEntry(texture, 0, texture.Length);
|
||||
m_texture = textureEnt;
|
||||
m_visualparams = visualParam.ToArray();
|
||||
if (textureEntry != null)
|
||||
m_texture = textureEntry;
|
||||
if (visualParams != null)
|
||||
m_visualparams = visualParams;
|
||||
|
||||
m_avatarHeight = 1.23077f // Shortest possible avatar height
|
||||
+ 0.516945f * (float)m_visualparams[(int)VPElement.SHAPE_HEIGHT] / 255.0f // Body height
|
||||
+ 0.072514f * (float)m_visualparams[(int)VPElement.SHAPE_HEAD_SIZE] / 255.0f // Head size
|
||||
|
||||
@@ -65,7 +65,7 @@ namespace OpenSim.Framework
|
||||
|
||||
public delegate void NetworkStats(int inPackets, int outPackets, int unAckedBytes);
|
||||
|
||||
public delegate void SetAppearance(byte[] texture, List<byte> visualParamList);
|
||||
public delegate void SetAppearance(Primitive.TextureEntry textureEntry, byte[] visualParams);
|
||||
|
||||
public delegate void StartAnim(IClientAPI remoteClient, UUID animID);
|
||||
|
||||
|
||||
@@ -227,8 +227,7 @@ namespace OpenSim.Framework.Tests
|
||||
wearbyte.Add(VisualParams[i]);
|
||||
}
|
||||
|
||||
|
||||
AvAppearance.SetAppearance(AvAppearance.Texture.GetBytes(), wearbyte);
|
||||
AvAppearance.SetAppearance(AvAppearance.Texture, (byte[])VisualParams.Clone());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user