aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics
diff options
context:
space:
mode:
authorKitto Flora2010-09-02 21:51:19 +0000
committerKitto Flora2010-09-02 21:51:19 +0000
commit16814dd8f18b51f5dd8841ae341847e117bb83b3 (patch)
tree46f1322936eb959292a320636c4a6f27be379d9e /OpenSim/Region/Physics
parentMerge branch 'careminster-presence-refactor' of ssh://3dhosting.de/var/git/ca... (diff)
downloadopensim-SC_OLD-16814dd8f18b51f5dd8841ae341847e117bb83b3.zip
opensim-SC_OLD-16814dd8f18b51f5dd8841ae341847e117bb83b3.tar.gz
opensim-SC_OLD-16814dd8f18b51f5dd8841ae341847e117bb83b3.tar.bz2
opensim-SC_OLD-16814dd8f18b51f5dd8841ae341847e117bb83b3.tar.xz
Fixes to JUMP system.
Diffstat (limited to 'OpenSim/Region/Physics')
-rw-r--r--OpenSim/Region/Physics/ChOdePlugin/ODECharacter.cs7
1 files changed, 5 insertions, 2 deletions
diff --git a/OpenSim/Region/Physics/ChOdePlugin/ODECharacter.cs b/OpenSim/Region/Physics/ChOdePlugin/ODECharacter.cs
index 61c16b8..0c79aa6 100644
--- a/OpenSim/Region/Physics/ChOdePlugin/ODECharacter.cs
+++ b/OpenSim/Region/Physics/ChOdePlugin/ODECharacter.cs
@@ -90,6 +90,7 @@ namespace OpenSim.Region.Physics.OdePlugin
90 public float walkDivisor = 1.3f; 90 public float walkDivisor = 1.3f;
91 public float runDivisor = 0.8f; 91 public float runDivisor = 0.8f;
92 private bool flying = false; 92 private bool flying = false;
93 private bool jumping = false; // add for jumping
93 private bool m_iscolliding = false; 94 private bool m_iscolliding = false;
94 private bool m_iscollidingGround = false; 95 private bool m_iscollidingGround = false;
95 private bool m_wascolliding = false; 96 private bool m_wascolliding = false;
@@ -229,7 +230,8 @@ namespace OpenSim.Region.Physics.OdePlugin
229 230
230 public override bool Selected 231 public override bool Selected
231 { 232 {
232 set { return; } 233// set { return; }
234 set { jumping = value; } // add for jumping flag
233 } 235 }
234 236
235 public override float Buoyancy 237 public override float Buoyancy
@@ -1018,7 +1020,8 @@ namespace OpenSim.Region.Physics.OdePlugin
1018 { // close, jump to lateral destination 1020 { // close, jump to lateral destination
1019 d.BodySetPosition(Body, _zeroPosition.X, _zeroPosition.Y, pos.Z); 1021 d.BodySetPosition(Body, _zeroPosition.X, _zeroPosition.Y, pos.Z);
1020 } 1022 }
1021 if (flying) 1023// if (flying)
1024 if (flying || jumping) // add for jumping
1022 { 1025 {
1023 vec.Z = (_target_velocity.Z - vel.Z) * (PID_D) + (_zeroPosition.Z - pos.Z) * PID_P; 1026 vec.Z = (_target_velocity.Z - vel.Z) * (PID_D) + (_zeroPosition.Z - pos.Z) * PID_P;
1024 } 1027 }