mirror of
https://github.com/opensim/opensim.git
synced 2026-08-01 06:06:06 +08:00
refactor: Use clearer part.ParentGroup.IsAttachment in LSL_Api.GetPartLocalPos()
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user