diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index 6e0fc43..4cbf3e1 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | |||
@@ -1912,6 +1912,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1912 | return Vector3.Zero; | 1912 | return Vector3.Zero; |
1913 | } | 1913 | } |
1914 | 1914 | ||
1915 | // This is used by both Double-Click Auto-Pilot and llMoveToTarget() in an attached object | ||
1915 | public void moveToTarget(Vector3 target, float tau) | 1916 | public void moveToTarget(Vector3 target, float tau) |
1916 | { | 1917 | { |
1917 | SceneObjectPart rootpart = m_rootPart; | 1918 | SceneObjectPart rootpart = m_rootPart; |
@@ -1951,9 +1952,17 @@ namespace OpenSim.Region.Framework.Scenes | |||
1951 | SceneObjectPart rootpart = m_rootPart; | 1952 | SceneObjectPart rootpart = m_rootPart; |
1952 | if (rootpart != null) | 1953 | if (rootpart != null) |
1953 | { | 1954 | { |
1954 | if (rootpart.PhysActor != null) | 1955 | if (IsAttachment) |
1955 | { | 1956 | { |
1956 | rootpart.PhysActor.PIDActive = false; | 1957 | ScenePresence avatar = m_scene.GetScenePresence(rootpart.AttachedAvatar); |
1958 | if (avatar != null) avatar.StopMoveToPosition(); | ||
1959 | } | ||
1960 | else | ||
1961 | { | ||
1962 | if (rootpart.PhysActor != null) | ||
1963 | { | ||
1964 | rootpart.PhysActor.PIDActive = false; | ||
1965 | } | ||
1957 | } | 1966 | } |
1958 | } | 1967 | } |
1959 | } | 1968 | } |