From 16814dd8f18b51f5dd8841ae341847e117bb83b3 Mon Sep 17 00:00:00 2001 From: Kitto Flora Date: Thu, 2 Sep 2010 21:51:19 +0000 Subject: Fixes to JUMP system. --- OpenSim/Region/Physics/ChOdePlugin/ODECharacter.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/Physics') 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 public float walkDivisor = 1.3f; public float runDivisor = 0.8f; private bool flying = false; + private bool jumping = false; // add for jumping private bool m_iscolliding = false; private bool m_iscollidingGround = false; private bool m_wascolliding = false; @@ -229,7 +230,8 @@ namespace OpenSim.Region.Physics.OdePlugin public override bool Selected { - set { return; } +// set { return; } + set { jumping = value; } // add for jumping flag } public override float Buoyancy @@ -1018,7 +1020,8 @@ namespace OpenSim.Region.Physics.OdePlugin { // close, jump to lateral destination d.BodySetPosition(Body, _zeroPosition.X, _zeroPosition.Y, pos.Z); } - if (flying) +// if (flying) + if (flying || jumping) // add for jumping { vec.Z = (_target_velocity.Z - vel.Z) * (PID_D) + (_zeroPosition.Z - pos.Z) * PID_P; } -- cgit v1.1