diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index 6e56f603cb..4a8be4255a 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs @@ -266,7 +266,7 @@ namespace OpenSim.Region.Framework.Scenes public Quaternion SpinOldOrientation = Quaternion.Identity; - protected int m_APIDIterations = 0; + protected bool m_APIDActive = false; protected Quaternion m_APIDTarget = Quaternion.Identity; protected float m_APIDDamp = 0; protected float m_APIDStrength = 0; @@ -642,6 +642,12 @@ namespace OpenSim.Region.Framework.Scenes } } + protected bool APIDActive + { + get { return m_APIDActive; } + set { m_APIDActive = value; } + } + protected Quaternion APIDTarget { get { return m_APIDTarget; } @@ -2621,7 +2627,7 @@ namespace OpenSim.Region.Framework.Scenes return; } - m_APIDIterations = 1 + (int)(Math.PI * APIDStrength); + APIDActive = true; } // Necessary to get the lookat deltas applied @@ -2635,7 +2641,7 @@ namespace OpenSim.Region.Framework.Scenes public void StopLookAt() { - APIDTarget = Quaternion.Identity; + APIDActive = false; } @@ -4884,7 +4890,7 @@ namespace OpenSim.Region.Framework.Scenes { try { - if (APIDTarget != Quaternion.Identity) + if (APIDActive) { PhysicsActor pa = ParentGroup.RootPart.PhysActor; if (pa == null || !pa.IsPhysical || APIDStrength < 0.04)