From 4a58d4c5a4e7e405448113a0efd5c34349eed7b5 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 6 Apr 2012 23:36:13 +0100 Subject: refactor: Use clearer part.ParentGroup.IsAttachment in LSL_Api.GetPartLocalPos() --- OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index ad73f47..021b352 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -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; } } -- cgit v1.1