If llStopMoveToTarget() is called on an attachment, then stop the avatar if it was moving to target.

Same behaviour as on Linden Lab grid.
Will probably also address http://opensimulator.org/mantis/view.php?id=7369 by not generating spurious object updates when llStopMoveToTarget() is called in attachments where the avatar is not moving.
mb-throttle-test
Justin Clark-Casey 2014-11-19 19:08:33 +00:00
parent b9f870fa73
commit 67e56872f3
1 changed files with 19 additions and 5 deletions

View File

@ -1891,11 +1891,10 @@ namespace OpenSim.Region.Framework.Scenes
if (IsAttachment) if (IsAttachment)
{ {
ScenePresence avatar = m_scene.GetScenePresence(AttachedAvatar); ScenePresence avatar = m_scene.GetScenePresence(AttachedAvatar);
if (avatar != null) if (avatar != null)
{
avatar.MoveToTarget(target, false, false); avatar.MoveToTarget(target, false, false);
} }
}
else else
{ {
PhysicsActor pa = RootPart.PhysActor; PhysicsActor pa = RootPart.PhysActor;
@ -1910,11 +1909,26 @@ namespace OpenSim.Region.Framework.Scenes
} }
public void stopMoveToTarget() public void stopMoveToTarget()
{
if (IsAttachment)
{
ScenePresence avatar = m_scene.GetScenePresence(AttachedAvatar);
if (avatar != null)
avatar.ResetMoveToTarget();
}
else
{ {
PhysicsActor pa = RootPart.PhysActor; PhysicsActor pa = RootPart.PhysActor;
if (pa != null) if (pa != null)
{
pa.PIDActive = false; pa.PIDActive = false;
ScheduleGroupForTerseUpdate();
//ParentGroup.ScheduleGroupForFullUpdate();
}
}
} }
/// <summary> /// <summary>