refactor: Use clearer part.ParentGroup.IsAttachment in LSL_Api.GetPartLocalPos()
parent
3af1cd65f9
commit
4a58d4c5a4
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue