From 6bebb9206cc0ec966f75ab52c76c66b4546d730f Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Wed, 19 Nov 2014 20:11:16 +0000 Subject: fix stopMoveToTarget in attachments case ( similar to core fix) --- OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index 9a2707b..89c7a1a 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs @@ -2468,12 +2468,23 @@ namespace OpenSim.Region.Framework.Scenes public void stopMoveToTarget() { - PhysicsActor pa = RootPart.PhysActor; + if (IsAttachment) + { + ScenePresence avatar = m_scene.GetScenePresence(AttachedAvatar); + if (avatar != null) + { + avatar.ResetMoveToTarget(); + } + } + else + { + PhysicsActor pa = RootPart.PhysActor; - if (pa != null) - pa.PIDActive = false; + if (pa != null) + pa.PIDActive = false; - RootPart.ScheduleTerseUpdate(); // send a stop information + RootPart.ScheduleTerseUpdate(); // send a stop information + } } public void rotLookAt(Quaternion target, float strength, float damping) -- cgit v1.1