fix stopMoveToTarget in attachments case ( similar to core fix)

avinationmerge
UbitUmarov 2014-11-19 20:11:16 +00:00
parent bb5ab05482
commit 6bebb9206c
1 changed files with 15 additions and 4 deletions

View File

@ -2468,12 +2468,23 @@ namespace OpenSim.Region.Framework.Scenes
public void stopMoveToTarget() 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) if (pa != null)
pa.PIDActive = false; pa.PIDActive = false;
RootPart.ScheduleTerseUpdate(); // send a stop information RootPart.ScheduleTerseUpdate(); // send a stop information
}
} }
public void rotLookAt(Quaternion target, float strength, float damping) public void rotLookAt(Quaternion target, float strength, float damping)