aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Framework')
-rw-r--r--OpenSim/Framework/AvatarAppearance.cs12
-rw-r--r--OpenSim/Framework/IClientAPI.cs2
-rw-r--r--OpenSim/Framework/Tests/AgentCircuitDataTest.cs3
3 files changed, 8 insertions, 9 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
diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs
index 2ca2df9..430cbd7 100644
--- a/OpenSim/Framework/IClientAPI.cs
+++ b/OpenSim/Framework/IClientAPI.cs
@@ -65,7 +65,7 @@ namespace OpenSim.Framework
65 65
66 public delegate void NetworkStats(int inPackets, int outPackets, int unAckedBytes); 66 public delegate void NetworkStats(int inPackets, int outPackets, int unAckedBytes);
67 67
68 public delegate void SetAppearance(byte[] texture, List<byte> visualParamList); 68 public delegate void SetAppearance(Primitive.TextureEntry textureEntry, byte[] visualParams);
69 69
70 public delegate void StartAnim(IClientAPI remoteClient, UUID animID); 70 public delegate void StartAnim(IClientAPI remoteClient, UUID animID);
71 71
diff --git a/OpenSim/Framework/Tests/AgentCircuitDataTest.cs b/OpenSim/Framework/Tests/AgentCircuitDataTest.cs
index ecd35c0..2fda6f3 100644
--- a/OpenSim/Framework/Tests/AgentCircuitDataTest.cs
+++ b/OpenSim/Framework/Tests/AgentCircuitDataTest.cs
@@ -227,8 +227,7 @@ namespace OpenSim.Framework.Tests
227 wearbyte.Add(VisualParams[i]); 227 wearbyte.Add(VisualParams[i]);
228 } 228 }
229 229
230 230 AvAppearance.SetAppearance(AvAppearance.Texture, (byte[])VisualParams.Clone());
231 AvAppearance.SetAppearance(AvAppearance.Texture.GetBytes(), wearbyte);
232 } 231 }
233 232
234 /// <summary> 233 /// <summary>