From 236c0f8e8b5f9ef86c8614b53e5f404754c9e8d9 Mon Sep 17 00:00:00 2001 From: Kitto Flora Date: Fri, 16 Jul 2010 22:17:06 +0000 Subject: [PATCH] Fix llSetForecAndTorque([0]) stops linear motion. Mantis #187 --- OpenSim/Region/Physics/ChOdePlugin/ODEPrim.cs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/OpenSim/Region/Physics/ChOdePlugin/ODEPrim.cs b/OpenSim/Region/Physics/ChOdePlugin/ODEPrim.cs index 6b17ce76bf..7e70db9870 100644 --- a/OpenSim/Region/Physics/ChOdePlugin/ODEPrim.cs +++ b/OpenSim/Region/Physics/ChOdePlugin/ODEPrim.cs @@ -1735,6 +1735,13 @@ namespace OpenSim.Region.Physics.OdePlugin if (m_isphysical) { disableBodySoft(); + + if (Body != IntPtr.Zero) + { + d.BodySetLinearVel(Body, 0f, 0f, 0f); + d.BodySetForce(Body, 0, 0, 0); + enableBodySoft(); + } } } else @@ -1756,6 +1763,7 @@ namespace OpenSim.Region.Physics.OdePlugin d.GeomSetCategoryBits(prim_geom, (int)m_collisionCategories); d.GeomSetCollideBits(prim_geom, (int)m_collisionFlags); } +/* Uhhh - stop the motion if the object is _selected_!! if (m_isphysical) { if (Body != IntPtr.Zero) @@ -1765,6 +1773,7 @@ namespace OpenSim.Region.Physics.OdePlugin enableBodySoft(); } } +*/ } resetCollisionAccounting();