From 240e8646dac402068930065c1fb792e647f1ce4b Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Tue, 6 May 2008 00:23:19 +0000 Subject: * If you llApplyImpulse on an attachment, it applies impulse on the avatar, not the attachment. --- OpenSim/Region/Physics/OdePlugin/ODECharacter.cs | 21 ++++++++++++++++----- OpenSim/Region/Physics/OdePlugin/ODEPrim.cs | 2 +- 2 files changed, 17 insertions(+), 6 deletions(-) (limited to 'OpenSim/Region/Physics/OdePlugin') diff --git a/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs b/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs index 3d0855f..17e041d 100644 --- a/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs +++ b/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs @@ -610,13 +610,24 @@ namespace OpenSim.Region.Physics.OdePlugin /// The PID controller takes this target velocity and tries to make it a reality /// /// - public override void AddForce(PhysicsVector force) + public override void AddForce(PhysicsVector force, bool pushforce) { - m_pidControllerActive = true; - _target_velocity.X += force.X; - _target_velocity.Y += force.Y; - _target_velocity.Z += force.Z; + if (pushforce) + { + m_pidControllerActive = false; + doForce(force); + //_target_velocity.X += force.X; + // _target_velocity.Y += force.Y; + //_target_velocity.Z += force.Z; + } + else + { + m_pidControllerActive = true; + _target_velocity.X += force.X; + _target_velocity.Y += force.Y; + _target_velocity.Z += force.Z; + } //m_lastUpdateSent = false; } diff --git a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs index 4e1696d..cf9dc5d 100644 --- a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs +++ b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs @@ -1884,7 +1884,7 @@ namespace OpenSim.Region.Physics.OdePlugin _acceleration = accel; } - public override void AddForce(PhysicsVector force) + public override void AddForce(PhysicsVector force, bool pushforce) { m_forcelist.Add(force); m_taintforce = true; -- cgit v1.1