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