diff options
author | UbitUmarov | 2012-11-24 22:46:24 +0000 |
---|---|---|
committer | UbitUmarov | 2012-11-24 22:46:24 +0000 |
commit | 62244b5ea5d9fcbe24e35906517fb02022cdcc7c (patch) | |
tree | 6243ff17fc446952a486472c18afcdf792265508 /OpenSim/Region | |
parent | avoid potencial NullReferenceException (diff) | |
download | opensim-SC_OLD-62244b5ea5d9fcbe24e35906517fb02022cdcc7c.zip opensim-SC_OLD-62244b5ea5d9fcbe24e35906517fb02022cdcc7c.tar.gz opensim-SC_OLD-62244b5ea5d9fcbe24e35906517fb02022cdcc7c.tar.bz2 opensim-SC_OLD-62244b5ea5d9fcbe24e35906517fb02022cdcc7c.tar.xz |
don't zero constant force and torque in selection
Diffstat (limited to 'OpenSim/Region')
-rw-r--r-- | OpenSim/Region/Physics/UbitOdePlugin/ODEPrim.cs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/OpenSim/Region/Physics/UbitOdePlugin/ODEPrim.cs b/OpenSim/Region/Physics/UbitOdePlugin/ODEPrim.cs index dc247a9..7dddab6 100644 --- a/OpenSim/Region/Physics/UbitOdePlugin/ODEPrim.cs +++ b/OpenSim/Region/Physics/UbitOdePlugin/ODEPrim.cs | |||
@@ -84,7 +84,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
84 | 84 | ||
85 | private Vector3 _position; | 85 | private Vector3 _position; |
86 | private Vector3 _velocity; | 86 | private Vector3 _velocity; |
87 | private Vector3 _torque; | 87 | private Vector3 m_torque; |
88 | private Vector3 m_lastVelocity; | 88 | private Vector3 m_lastVelocity; |
89 | private Vector3 m_lastposition; | 89 | private Vector3 m_lastposition; |
90 | private Vector3 m_rotationalVelocity; | 90 | private Vector3 m_rotationalVelocity; |
@@ -597,7 +597,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
597 | if (!IsPhysical || Body == IntPtr.Zero) | 597 | if (!IsPhysical || Body == IntPtr.Zero) |
598 | return Vector3.Zero; | 598 | return Vector3.Zero; |
599 | 599 | ||
600 | return _torque; | 600 | return m_torque; |
601 | } | 601 | } |
602 | 602 | ||
603 | set | 603 | set |
@@ -2425,10 +2425,10 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
2425 | { | 2425 | { |
2426 | if (!childPrim) | 2426 | if (!childPrim) |
2427 | { | 2427 | { |
2428 | m_force = Vector3.Zero; | 2428 | // m_force = Vector3.Zero; |
2429 | m_forceacc = Vector3.Zero; | 2429 | m_forceacc = Vector3.Zero; |
2430 | m_angularForceacc = Vector3.Zero; | 2430 | m_angularForceacc = Vector3.Zero; |
2431 | _torque = Vector3.Zero; | 2431 | // m_torque = Vector3.Zero; |
2432 | _velocity = Vector3.Zero; | 2432 | _velocity = Vector3.Zero; |
2433 | _acceleration = Vector3.Zero; | 2433 | _acceleration = Vector3.Zero; |
2434 | m_rotationalVelocity = Vector3.Zero; | 2434 | m_rotationalVelocity = Vector3.Zero; |
@@ -2968,7 +2968,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
2968 | d.BodyEnable(Body); | 2968 | d.BodyEnable(Body); |
2969 | 2969 | ||
2970 | } | 2970 | } |
2971 | _torque = newtorque; | 2971 | m_torque = newtorque; |
2972 | } | 2972 | } |
2973 | } | 2973 | } |
2974 | 2974 | ||
@@ -3364,7 +3364,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
3364 | 3364 | ||
3365 | Vector3 trq; | 3365 | Vector3 trq; |
3366 | 3366 | ||
3367 | trq = _torque; | 3367 | trq = m_torque; |
3368 | trq += m_angularForceacc; | 3368 | trq += m_angularForceacc; |
3369 | m_angularForceacc = Vector3.Zero; | 3369 | m_angularForceacc = Vector3.Zero; |
3370 | if (trq.X != 0 || trq.Y != 0 || trq.Z != 0) | 3370 | if (trq.X != 0 || trq.Y != 0 || trq.Z != 0) |