diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Physics/ChOdePlugin/ODECharacter.cs | 7 |
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 | } |