Eliminate duplicate AttachmentPoint properties by always using the one stored in the root part's state field.

This commit is contained in:
Justin Clark-Casey (justincc)
2011-08-27 00:33:24 +01:00
parent b7700428ec
commit 1615e7d29f
4 changed files with 41 additions and 44 deletions

View File

@@ -166,7 +166,24 @@ namespace OpenSim.Region.Framework.Scenes
/// <remarks>
/// 0 if we're not attached to anything
/// </remarks>
public uint AttachmentPoint;
public uint AttachmentPoint
{
get
{
return m_rootPart.Shape.State;
}
set
{
IsAttachment = value != 0;
m_rootPart.Shape.State = (byte)value;
}
}
public void ClearPartAttachmentData()
{
AttachmentPoint = 0;
}
/// <summary>
/// Is this scene object phantom?
@@ -976,23 +993,6 @@ namespace OpenSim.Region.Framework.Scenes
}
}
public byte GetAttachmentPoint()
{
return m_rootPart.Shape.State;
}
public void SetAttachmentPoint(uint point)
{
AttachmentPoint = point;
IsAttachment = point != 0;
m_rootPart.Shape.State = (byte)point;
}
public void ClearPartAttachmentData()
{
SetAttachmentPoint((Byte)0);
}
/// <summary>
///
/// </summary>