diff options
author | John Hurliman | 2009-09-30 15:53:03 -0700 |
---|---|---|
committer | John Hurliman | 2009-09-30 15:53:03 -0700 |
commit | 5dfd2643dfc530280e5dcd0056b59add7d49f313 (patch) | |
tree | 1e508a2e9be42eda630f0b97c4fac9606a288a7e /OpenSim/Framework/AvatarAppearance.cs | |
parent | Prevent null data being sent to the decoder (diff) | |
download | opensim-SC-5dfd2643dfc530280e5dcd0056b59add7d49f313.zip opensim-SC-5dfd2643dfc530280e5dcd0056b59add7d49f313.tar.gz opensim-SC-5dfd2643dfc530280e5dcd0056b59add7d49f313.tar.bz2 opensim-SC-5dfd2643dfc530280e5dcd0056b59add7d49f313.tar.xz |
* 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
Diffstat (limited to 'OpenSim/Framework/AvatarAppearance.cs')
-rw-r--r-- | OpenSim/Framework/AvatarAppearance.cs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/OpenSim/Framework/AvatarAppearance.cs b/OpenSim/Framework/AvatarAppearance.cs index 940ae3b..3f4214e 100644 --- a/OpenSim/Framework/AvatarAppearance.cs +++ b/OpenSim/Framework/AvatarAppearance.cs | |||
@@ -380,13 +380,13 @@ namespace OpenSim.Framework | |||
380 | /// <summary> | 380 | /// <summary> |
381 | /// Set up appearance textures and avatar parameters, including a height calculation | 381 | /// Set up appearance textures and avatar parameters, including a height calculation |
382 | /// </summary> | 382 | /// </summary> |
383 | /// <param name="texture"></param> | 383 | public virtual void SetAppearance(Primitive.TextureEntry textureEntry, byte[] visualParams) |
384 | /// <param name="visualParam"></param> | ||
385 | public virtual void SetAppearance(byte[] texture, List<byte> visualParam) | ||
386 | { | 384 | { |
387 | Primitive.TextureEntry textureEnt = new Primitive.TextureEntry(texture, 0, texture.Length); | 385 | if (textureEntry != null) |
388 | m_texture = textureEnt; | 386 | m_texture = textureEntry; |
389 | m_visualparams = visualParam.ToArray(); | 387 | if (visualParams != null) |
388 | m_visualparams = visualParams; | ||
389 | |||
390 | m_avatarHeight = 1.23077f // Shortest possible avatar height | 390 | m_avatarHeight = 1.23077f // Shortest possible avatar height |
391 | + 0.516945f * (float)m_visualparams[(int)VPElement.SHAPE_HEIGHT] / 255.0f // Body height | 391 | + 0.516945f * (float)m_visualparams[(int)VPElement.SHAPE_HEIGHT] / 255.0f // Body height |
392 | + 0.072514f * (float)m_visualparams[(int)VPElement.SHAPE_HEAD_SIZE] / 255.0f // Head size | 392 | + 0.072514f * (float)m_visualparams[(int)VPElement.SHAPE_HEAD_SIZE] / 255.0f // Head size |