aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework
diff options
context:
space:
mode:
authorMelanie2012-04-27 01:31:12 +0100
committerMelanie2012-04-27 01:31:12 +0100
commit7397c9a68e3c5dd53e387d347b9c03a4f66ac603 (patch)
tree17ffda6bb90954719878defadf46967872eca642 /OpenSim/Framework
parentMerge branch 'master' of ssh://melanie@3dhosting.de/var/git/careminster into ... (diff)
parentrevert last add commit (diff)
downloadopensim-SC_OLD-7397c9a68e3c5dd53e387d347b9c03a4f66ac603.zip
opensim-SC_OLD-7397c9a68e3c5dd53e387d347b9c03a4f66ac603.tar.gz
opensim-SC_OLD-7397c9a68e3c5dd53e387d347b9c03a4f66ac603.tar.bz2
opensim-SC_OLD-7397c9a68e3c5dd53e387d347b9c03a4f66ac603.tar.xz
Merge branch 'master' of ssh://melanie@3dhosting.de/var/git/careminster into careminster
Diffstat (limited to 'OpenSim/Framework')
-rw-r--r--OpenSim/Framework/AvatarAppearance.cs34
-rw-r--r--OpenSim/Framework/AvatarWearable.cs18
2 files changed, 37 insertions, 15 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
diff --git a/OpenSim/Framework/AvatarWearable.cs b/OpenSim/Framework/AvatarWearable.cs
index 8e27596..aee295a 100644
--- a/OpenSim/Framework/AvatarWearable.cs
+++ b/OpenSim/Framework/AvatarWearable.cs
@@ -62,9 +62,14 @@ namespace OpenSim.Framework
62 public static readonly int UNDERSHIRT = 10; 62 public static readonly int UNDERSHIRT = 10;
63 public static readonly int UNDERPANTS = 11; 63 public static readonly int UNDERPANTS = 11;
64 public static readonly int SKIRT = 12; 64 public static readonly int SKIRT = 12;
65
66 public static readonly int MAX_BASICWEARABLES = 13;
67
65 public static readonly int ALPHA = 13; 68 public static readonly int ALPHA = 13;
66 public static readonly int TATTOO = 14; 69 public static readonly int TATTOO = 14;
70// public static readonly int PHYSICS = 15;
67 71
72 // public static readonly int MAX_WEARABLES = 16;
68 public static readonly int MAX_WEARABLES = 15; 73 public static readonly int MAX_WEARABLES = 15;
69 74
70 public static readonly UUID DEFAULT_BODY_ITEM = new UUID("66c41e39-38f9-f75a-024e-585989bfaba9"); 75 public static readonly UUID DEFAULT_BODY_ITEM = new UUID("66c41e39-38f9-f75a-024e-585989bfaba9");
@@ -219,7 +224,7 @@ namespace OpenSim.Framework
219 { 224 {
220 get 225 get
221 { 226 {
222 AvatarWearable[] defaultWearables = new AvatarWearable[MAX_WEARABLES]; //should be 15 of these 227 AvatarWearable[] defaultWearables = new AvatarWearable[MAX_WEARABLES];
223 for (int i = 0; i < MAX_WEARABLES; i++) 228 for (int i = 0; i < MAX_WEARABLES; i++)
224 { 229 {
225 defaultWearables[i] = new AvatarWearable(); 230 defaultWearables[i] = new AvatarWearable();
@@ -242,10 +247,13 @@ namespace OpenSim.Framework
242 247
243// // Alpha 248// // Alpha
244// defaultWearables[ALPHA].Add(DEFAULT_ALPHA_ITEM, DEFAULT_ALPHA_ASSET); 249// defaultWearables[ALPHA].Add(DEFAULT_ALPHA_ITEM, DEFAULT_ALPHA_ASSET);
245 250
246// // Tattoo 251 // // Tattoo
247// defaultWearables[TATTOO].Add(DEFAULT_TATTOO_ITEM, DEFAULT_TATTOO_ASSET); 252 // defaultWearables[TATTOO].Add(DEFAULT_TATTOO_ITEM, DEFAULT_TATTOO_ASSET);
248 253
254 // // Physics
255 // defaultWearables[PHYSICS].Add(DEFAULT_TATTOO_ITEM, DEFAULT_TATTOO_ASSET);
256
249 return defaultWearables; 257 return defaultWearables;
250 } 258 }
251 } 259 }