aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorUbitUmarov2012-04-26 16:17:46 +0100
committerUbitUmarov2012-04-26 16:17:46 +0100
commitfd19601c6ba3b474201e2dde514c7d7c94e74e82 (patch)
tree21685c95e2bf75c297e4f0af9c0753d7ee944ff1 /OpenSim
parentset PIDHoverTau and not PIDTau since all physics need that (diff)
downloadopensim-SC_OLD-fd19601c6ba3b474201e2dde514c7d7c94e74e82.zip
opensim-SC_OLD-fd19601c6ba3b474201e2dde514c7d7c94e74e82.tar.gz
opensim-SC_OLD-fd19601c6ba3b474201e2dde514c7d7c94e74e82.tar.bz2
opensim-SC_OLD-fd19601c6ba3b474201e2dde514c7d7c94e74e82.tar.xz
Help big boobies to dance (avatar visualParams). May not persist and need more lobe ?
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Framework/AvatarAppearance.cs34
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs2
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneGraph.cs2
-rw-r--r--OpenSim/Services/Interfaces/IAvatarService.cs20
4 files changed, 41 insertions, 17 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/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
index 1004be6..40ebed1 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
@@ -3533,7 +3533,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3533 3533
3534 AvatarAppearancePacket avp = (AvatarAppearancePacket)PacketPool.Instance.GetPacket(PacketType.AvatarAppearance); 3534 AvatarAppearancePacket avp = (AvatarAppearancePacket)PacketPool.Instance.GetPacket(PacketType.AvatarAppearance);
3535 // TODO: don't create new blocks if recycling an old packet 3535 // TODO: don't create new blocks if recycling an old packet
3536 avp.VisualParam = new AvatarAppearancePacket.VisualParamBlock[218]; 3536 avp.VisualParam = new AvatarAppearancePacket.VisualParamBlock[visualParams.Length];
3537 avp.ObjectData.TextureEntry = textureEntry; 3537 avp.ObjectData.TextureEntry = textureEntry;
3538 3538
3539 AvatarAppearancePacket.VisualParamBlock avblock = null; 3539 AvatarAppearancePacket.VisualParamBlock avblock = null;
diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
index b7dc335..d4965ea 100644
--- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
@@ -354,7 +354,7 @@ namespace OpenSim.Region.Framework.Scenes
354 sceneObject.RootPart.ApplyImpulse((vel * sceneObject.GetMass()), false); 354 sceneObject.RootPart.ApplyImpulse((vel * sceneObject.GetMass()), false);
355 sceneObject.Velocity = vel; 355 sceneObject.Velocity = vel;
356 } 356 }
357 357
358 return true; 358 return true;
359 } 359 }
360 360
diff --git a/OpenSim/Services/Interfaces/IAvatarService.cs b/OpenSim/Services/Interfaces/IAvatarService.cs
index cda7113..8412c35 100644
--- a/OpenSim/Services/Interfaces/IAvatarService.cs
+++ b/OpenSim/Services/Interfaces/IAvatarService.cs
@@ -162,10 +162,16 @@ namespace OpenSim.Services.Interfaces
162 } 162 }
163 163
164 // Visual Params 164 // Visual Params
165 string[] vps = new string[AvatarAppearance.VISUALPARAM_COUNT]; 165 // string[] vps = new string[AvatarAppearance.VISUALPARAM_COUNT];
166 // byte[] binary = appearance.VisualParams;
167
168 // for (int i = 0 ; i < AvatarAppearance.VISUALPARAM_COUNT ; i++)
169
170
166 byte[] binary = appearance.VisualParams; 171 byte[] binary = appearance.VisualParams;
172 string[] vps = new string[binary.Length];
167 173
168 for (int i = 0 ; i < AvatarAppearance.VISUALPARAM_COUNT ; i++) 174 for (int i = 0; i < binary.Length; i++)
169 { 175 {
170 vps[i] = binary[i].ToString(); 176 vps[i] = binary[i].ToString();
171 } 177 }
@@ -265,10 +271,14 @@ namespace OpenSim.Services.Interfaces
265 if (Data.ContainsKey("VisualParams")) 271 if (Data.ContainsKey("VisualParams"))
266 { 272 {
267 string[] vps = Data["VisualParams"].Split(new char[] {','}); 273 string[] vps = Data["VisualParams"].Split(new char[] {','});
268 byte[] binary = new byte[AvatarAppearance.VISUALPARAM_COUNT]; 274 // byte[] binary = new byte[AvatarAppearance.VISUALPARAM_COUNT];
275
276 // for (int i = 0 ; i < vps.Length && i < binary.Length ; i++)
277 byte[] binary = new byte[vps.Length];
278
279 for (int i = 0; i < vps.Length; i++)
269 280
270 for (int i = 0 ; i < vps.Length && i < binary.Length ; i++) 281 binary[i] = (byte)Convert.ToInt32(vps[i]);
271 binary[i] = (byte)Convert.ToInt32(vps[i]);
272 282
273 appearance.VisualParams = binary; 283 appearance.VisualParams = binary;
274 } 284 }