From eccc6f108131d1283a0ba84becd9606305c1057a Mon Sep 17 00:00:00 2001
From: UbitUmarov
Date: Sun, 8 Nov 2015 00:22:06 +0000
Subject:  fix wrong condition to set low angular velocity as Zero.

---
 OpenSim/Region/PhysicsModules/ubOde/ODEPrim.cs | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

(limited to 'OpenSim/Region/PhysicsModules')

diff --git a/OpenSim/Region/PhysicsModules/ubOde/ODEPrim.cs b/OpenSim/Region/PhysicsModules/ubOde/ODEPrim.cs
index 6e2f877..2752449 100644
--- a/OpenSim/Region/PhysicsModules/ubOde/ODEPrim.cs
+++ b/OpenSim/Region/PhysicsModules/ubOde/ODEPrim.cs
@@ -3657,16 +3657,16 @@ namespace OpenSim.Region.PhysicsModule.ubOde
                             _acceleration = Vector3.Zero;
                         }
 
-                        if ((Math.Abs(_orientation.X - ori.X) < 0.0001) &&
-                           (Math.Abs(_orientation.Y - ori.Y) < 0.0001) &&
-                           (Math.Abs(_orientation.Z - ori.Z) < 0.0001)
+                        vel = d.BodyGetAngularVel(Body);
+                        if ((Math.Abs(vel.X) < 0.0001) &&
+                           (Math.Abs(vel.Y) < 0.0001) &&
+                           (Math.Abs(vel.Z) < 0.0001)
                            )
                         {
                             m_rotationalVelocity = Vector3.Zero;
                         }
                         else
                         {
-                            vel = d.BodyGetAngularVel(Body);
                             m_rotationalVelocity.X = vel.X;
                             m_rotationalVelocity.Y = vel.Y;
                             m_rotationalVelocity.Z = vel.Z;
-- 
cgit v1.1