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 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) (limited to 'OpenSim/Region/Physics/OdePlugin/ODECharacter.cs') 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; } -- cgit v1.1