Trigger event with flag CHANGED_LINK when agent sits on objects that have not a sit target defined. This fixes Mantis #4692.
parent
8ea4933742
commit
7f0350b988
|
@ -3251,13 +3251,6 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
//}
|
||||
}
|
||||
|
||||
public void SetAvatarOnSitTarget(UUID avatarID)
|
||||
{
|
||||
m_sitTargetAvatar = avatarID;
|
||||
if (ParentGroup != null)
|
||||
ParentGroup.TriggerScriptChangedEvent(Changed.LINK);
|
||||
}
|
||||
|
||||
public void SetAxisRotation(int axis, int rotate)
|
||||
{
|
||||
if (m_parentGroup != null)
|
||||
|
|
|
@ -1703,7 +1703,9 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
}
|
||||
// Reset sit target.
|
||||
if (part.GetAvatarOnSitTarget() == UUID)
|
||||
part.SetAvatarOnSitTarget(UUID.Zero);
|
||||
part.SitTargetAvatar = UUID.Zero;
|
||||
if (part.ParentGroup != null)
|
||||
part.ParentGroup.TriggerScriptChangedEvent(Changed.LINK);
|
||||
|
||||
m_parentPosition = part.GetWorldPosition();
|
||||
ControllingClient.SendClearFollowCamProperties(part.ParentUUID);
|
||||
|
@ -1807,11 +1809,13 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
|
||||
if (SitTargetisSet && SitTargetUnOccupied)
|
||||
{
|
||||
part.SetAvatarOnSitTarget(UUID);
|
||||
part.SitTargetAvatar = UUID;
|
||||
offset = new Vector3(avSitOffSet.X, avSitOffSet.Y, avSitOffSet.Z);
|
||||
sitOrientation = avSitOrientation;
|
||||
autopilot = false;
|
||||
}
|
||||
if (part.ParentGroup != null)
|
||||
part.ParentGroup.TriggerScriptChangedEvent(Changed.LINK);
|
||||
|
||||
pos = part.AbsolutePosition + offset;
|
||||
//if (Math.Abs(part.AbsolutePosition.Z - AbsolutePosition.Z) > 1)
|
||||
|
|
Loading…
Reference in New Issue