aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes
diff options
context:
space:
mode:
authorTeravus Ovares2007-11-13 03:18:54 +0000
committerTeravus Ovares2007-11-13 03:18:54 +0000
commit57b646b7ae020453fbfcb3fe9ae27c4f5ce536ab (patch)
tree88dd0a93fc58a1d3c703dbb72ab36865186f3221 /OpenSim/Region/Environment/Scenes
parentadded IDs for all built-in animations (diff)
downloadopensim-SC_OLD-57b646b7ae020453fbfcb3fe9ae27c4f5ce536ab.zip
opensim-SC_OLD-57b646b7ae020453fbfcb3fe9ae27c4f5ce536ab.tar.gz
opensim-SC_OLD-57b646b7ae020453fbfcb3fe9ae27c4f5ce536ab.tar.bz2
opensim-SC_OLD-57b646b7ae020453fbfcb3fe9ae27c4f5ce536ab.tar.xz
* Added AV Height Glue & Avatar Height stored on m_AVHeight in ScenePresence
* Added glue to send it to the Physics Engines (in meters) * ODE Initial implementation of Avatar Height :D Change your height and not get all knee bendy
Diffstat (limited to 'OpenSim/Region/Environment/Scenes')
-rw-r--r--OpenSim/Region/Environment/Scenes/ScenePresence.cs18
1 files changed, 16 insertions, 2 deletions
diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.cs
index 4502fb3..69bf05a 100644
--- a/OpenSim/Region/Environment/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Environment/Scenes/ScenePresence.cs
@@ -67,6 +67,7 @@ namespace OpenSim.Region.Environment.Scenes
67 private bool m_newForce = false; 67 private bool m_newForce = false;
68 private bool m_newAvatar = false; 68 private bool m_newAvatar = false;
69 private bool m_newCoarseLocations = true; 69 private bool m_newCoarseLocations = true;
70 private float m_avHeight = 127.0f;
70 71
71 protected RegionInfo m_regionInfo; 72 protected RegionInfo m_regionInfo;
72 protected ulong crossingFromRegion = 0; 73 protected ulong crossingFromRegion = 0;
@@ -442,12 +443,25 @@ namespace OpenSim.Region.Environment.Scenes
442 { 443 {
443 LLObject.TextureEntry textureEnt = new LLObject.TextureEntry(texture, 0, texture.Length); 444 LLObject.TextureEntry textureEnt = new LLObject.TextureEntry(texture, 0, texture.Length);
444 m_textureEntry = textureEnt; 445 m_textureEntry = textureEnt;
445 446
446 for (int i = 0; i < visualParam.Length; i++) 447 for (int i = 0; i < visualParam.Length; i++)
447 { 448 {
448 m_visualParams[i] = visualParam[i].ParamValue; 449 m_visualParams[i] = visualParam[i].ParamValue;
450 //OpenSim.Framework.Console.MainLog.Instance.Verbose("CLIENT", "VisualData[" + i.ToString() + "]: " + visualParam[i].ParamValue.ToString() + "m");
451
449 } 452 }
450 453
454 // Teravus : Nifty AV Height Getting Maaaaagical formula. Oh how we love turning 0-255 into meters.
455 // (float)m_visualParams[25] = Height
456 // (float)m_visualParams[125] = LegLength
457 m_avHeight = (1.50856f + (((float)m_visualParams[25] / 255.0f) * (2.525506f - 1.50856f)))
458 + (((float)m_visualParams[125] / 255.0f) / 1.5f);
459 if (PhysicsActor != null)
460 {
461 PhysicsVector SetSize = new PhysicsVector(0, 0, m_avHeight);
462 PhysicsActor.Size = SetSize;
463 }
464 //OpenSim.Framework.Console.MainLog.Instance.Verbose("CLIENT", "Set Avatar Height to: " + (1.50856f + (((float)m_visualParams[25] / 255.0f) * (2.525506f - 1.50856f))).ToString() + "m" + " Leglength: " + ((float)m_visualParams[125]).ToString() + ":" + (((float)m_visualParams[125] / 255.0f)).ToString() + "m");
451 SendAppearanceToAllOtherAgents(); 465 SendAppearanceToAllOtherAgents();
452 } 466 }
453 467