Add SOG.HasPrivateAttachmentPoint to tell if a SOG has a private attachment point. HUDs attachment points are private.
Change SOP.SendFullUpdateToClient() and SoundModule.PlayAttachedSound() to use this rather than different magic number formulations. This also corrects a bug in PlayAttachedSound() where the code assumed that all attachment points over 30 were HUDs. It appears this is no longer true with Neck and Root (Avatar Center)0.7.4.1
parent
6a77a65675
commit
a4290048e5
|
@ -78,11 +78,8 @@ namespace OpenSim.Region.CoreModules.World.Sound
|
||||||
|
|
||||||
if (grp.IsAttachment)
|
if (grp.IsAttachment)
|
||||||
{
|
{
|
||||||
if (grp.AttachmentPoint > 30) // HUD
|
if (grp.HasPrivateAttachmentPoint && sp.ControllingClient.AgentId != grp.OwnerID)
|
||||||
{
|
return;
|
||||||
if (sp.ControllingClient.AgentId != grp.OwnerID)
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (sp.ControllingClient.AgentId == grp.OwnerID)
|
if (sp.ControllingClient.AgentId == grp.OwnerID)
|
||||||
dis = 0;
|
dis = 0;
|
||||||
|
|
|
@ -180,6 +180,22 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// If this scene object has an attachment point then indicate whether there is a point where
|
||||||
|
/// attachments are perceivable by avatars other than the avatar to which this object is attached.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// HUDs are not perceivable by other avatars.
|
||||||
|
/// </remarks>
|
||||||
|
public bool HasPrivateAttachmentPoint
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return AttachmentPoint >= (uint)OpenMetaverse.AttachmentPoint.HUDCenter2
|
||||||
|
&& AttachmentPoint <= (uint)OpenMetaverse.AttachmentPoint.HUDBottomRight;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void ClearPartAttachmentData()
|
public void ClearPartAttachmentData()
|
||||||
{
|
{
|
||||||
AttachmentPoint = 0;
|
AttachmentPoint = 0;
|
||||||
|
|
|
@ -2573,8 +2573,9 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
if (ParentGroup.IsDeleted)
|
if (ParentGroup.IsDeleted)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (ParentGroup.IsAttachment && (ParentGroup.AttachedAvatar != remoteClient.AgentId) &&
|
if (ParentGroup.IsAttachment
|
||||||
(ParentGroup.AttachmentPoint >= 31) && (ParentGroup.AttachmentPoint <= 38))
|
&& ParentGroup.AttachedAvatar != remoteClient.AgentId
|
||||||
|
&& ParentGroup.HasPrivateAttachmentPoint)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (remoteClient.AgentId == OwnerID)
|
if (remoteClient.AgentId == OwnerID)
|
||||||
|
|
Loading…
Reference in New Issue