diff options
author | UbitUmarov | 2015-10-18 00:35:52 +0100 |
---|---|---|
committer | UbitUmarov | 2015-10-18 00:35:52 +0100 |
commit | a31e5e799e5249ca06145aa47abffc556d188c64 (patch) | |
tree | f31276bae0ec1b6ff98eb234c04a40dca5193f2c /OpenSim/Region/PhysicsModules | |
parent | Fix wrong active angularlock detection (it was only burning cpu), stop tryin... (diff) | |
download | opensim-SC_OLD-a31e5e799e5249ca06145aa47abffc556d188c64.zip opensim-SC_OLD-a31e5e799e5249ca06145aa47abffc556d188c64.tar.gz opensim-SC_OLD-a31e5e799e5249ca06145aa47abffc556d188c64.tar.bz2 opensim-SC_OLD-a31e5e799e5249ca06145aa47abffc556d188c64.tar.xz |
stop a object when making it not physical
Diffstat (limited to 'OpenSim/Region/PhysicsModules')
-rw-r--r-- | OpenSim/Region/PhysicsModules/Ode/ODEPrim.cs | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/OpenSim/Region/PhysicsModules/Ode/ODEPrim.cs b/OpenSim/Region/PhysicsModules/Ode/ODEPrim.cs index 7e884d4..061beea 100644 --- a/OpenSim/Region/PhysicsModules/Ode/ODEPrim.cs +++ b/OpenSim/Region/PhysicsModules/Ode/ODEPrim.cs | |||
@@ -83,8 +83,15 @@ namespace OpenSim.Region.PhysicsModule.ODE | |||
83 | set | 83 | set |
84 | { | 84 | { |
85 | m_isphysical = value; | 85 | m_isphysical = value; |
86 | if (!m_isphysical) // Zero the remembered last velocity | 86 | if (!m_isphysical) |
87 | { | ||
88 | _zeroFlag = true; // Zero the remembered last velocity | ||
87 | m_lastVelocity = Vector3.Zero; | 89 | m_lastVelocity = Vector3.Zero; |
90 | _acceleration = Vector3.Zero; | ||
91 | _velocity = Vector3.Zero; | ||
92 | m_taintVelocity = Vector3.Zero; | ||
93 | m_rotationalVelocity = Vector3.Zero; | ||
94 | } | ||
88 | } | 95 | } |
89 | } | 96 | } |
90 | 97 | ||
@@ -2739,7 +2746,7 @@ Console.WriteLine(" JointCreateFixed"); | |||
2739 | Vector3 pv = Vector3.Zero; | 2746 | Vector3 pv = Vector3.Zero; |
2740 | bool lastZeroFlag = _zeroFlag; | 2747 | bool lastZeroFlag = _zeroFlag; |
2741 | float m_minvelocity = 0; | 2748 | float m_minvelocity = 0; |
2742 | if (Body != (IntPtr)0) // FIXME -> or if it is a joint | 2749 | if (Body != IntPtr.Zero) // FIXME -> or if it is a joint |
2743 | { | 2750 | { |
2744 | d.Vector3 vec = d.BodyGetPosition(Body); | 2751 | d.Vector3 vec = d.BodyGetPosition(Body); |
2745 | d.Quaternion ori = d.BodyGetQuaternion(Body); | 2752 | d.Quaternion ori = d.BodyGetQuaternion(Body); |