refactor: Use clearer part.ParentGroup.IsAttachment in LSL_Api.GetPartLocalPos()

integration
Justin Clark-Casey (justincc) 2012-04-06 23:36:13 +01:00
parent 3af1cd65f9
commit 4a58d4c5a4
1 changed files with 4 additions and 4 deletions

View File

@ -2025,19 +2025,19 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
Vector3 pos;
if (part.ParentID == 0)
if (!part.IsRoot)
{
pos = part.AbsolutePosition;
pos = part.OffsetPosition;
}
else
{
if (part.IsRoot)
if (part.ParentGroup.IsAttachment)
{
pos = part.AttachedPos;
}
else
{
pos = part.OffsetPosition;
pos = part.AbsolutePosition;
}
}