diff options
Diffstat (limited to 'OpenSim/Framework/AvatarAppearance.cs')
-rw-r--r-- | OpenSim/Framework/AvatarAppearance.cs | 34 |
1 files changed, 24 insertions, 10 deletions
diff --git a/OpenSim/Framework/AvatarAppearance.cs b/OpenSim/Framework/AvatarAppearance.cs index 3a0b861..c5d9641 100644 --- a/OpenSim/Framework/AvatarAppearance.cs +++ b/OpenSim/Framework/AvatarAppearance.cs | |||
@@ -42,6 +42,8 @@ namespace OpenSim.Framework | |||
42 | { | 42 | { |
43 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 43 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
44 | 44 | ||
45 | // this is viewer capabilities and weared things dependent | ||
46 | // should be only used as initial default value ( V1 viewers ) | ||
45 | public readonly static int VISUALPARAM_COUNT = 218; | 47 | public readonly static int VISUALPARAM_COUNT = 218; |
46 | 48 | ||
47 | public readonly static int TEXTURE_COUNT = 21; | 49 | public readonly static int TEXTURE_COUNT = 21; |
@@ -319,19 +321,30 @@ namespace OpenSim.Framework | |||
319 | // made. We determine if any of the visual parameters actually | 321 | // made. We determine if any of the visual parameters actually |
320 | // changed to know if the appearance should be saved later | 322 | // changed to know if the appearance should be saved later |
321 | bool changed = false; | 323 | bool changed = false; |
322 | for (int i = 0; i < AvatarAppearance.VISUALPARAM_COUNT; i++) | 324 | |
325 | int newsize = visualParams.Length; | ||
326 | |||
327 | if (newsize != m_visualparams.Length) | ||
328 | { | ||
329 | changed = true; | ||
330 | m_visualparams = (byte[])visualParams.Clone(); | ||
331 | } | ||
332 | else | ||
323 | { | 333 | { |
324 | if (visualParams[i] != m_visualparams[i]) | 334 | |
335 | for (int i = 0; i < newsize; i++) | ||
325 | { | 336 | { |
326 | // DEBUG ON | 337 | if (visualParams[i] != m_visualparams[i]) |
327 | // m_log.WarnFormat("[AVATARAPPEARANCE] vparams changed [{0}] {1} ==> {2}", | 338 | { |
328 | // i,m_visualparams[i],visualParams[i]); | 339 | // DEBUG ON |
329 | // DEBUG OFF | 340 | // m_log.WarnFormat("[AVATARAPPEARANCE] vparams changed [{0}] {1} ==> {2}", |
330 | m_visualparams[i] = visualParams[i]; | 341 | // i,m_visualparams[i],visualParams[i]); |
331 | changed = true; | 342 | // DEBUG OFF |
343 | m_visualparams[i] = visualParams[i]; | ||
344 | changed = true; | ||
345 | } | ||
332 | } | 346 | } |
333 | } | 347 | } |
334 | |||
335 | // Reset the height if the visual parameters actually changed | 348 | // Reset the height if the visual parameters actually changed |
336 | if (changed) | 349 | if (changed) |
337 | SetHeight(); | 350 | SetHeight(); |
@@ -389,7 +402,8 @@ namespace OpenSim.Framework | |||
389 | } | 402 | } |
390 | 403 | ||
391 | s += "Visual Params: "; | 404 | s += "Visual Params: "; |
392 | for (uint j = 0; j < AvatarAppearance.VISUALPARAM_COUNT; j++) | 405 | // for (uint j = 0; j < AvatarAppearance.VISUALPARAM_COUNT; j++) |
406 | for (uint j = 0; j < m_visualparams.Length; j++) | ||
393 | s += String.Format("{0},",m_visualparams[j]); | 407 | s += String.Format("{0},",m_visualparams[j]); |
394 | s += "\n"; | 408 | s += "\n"; |
395 | 409 | ||