From 3af1cd65f91db87778096196bfd985dc48c72d87 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Fri, 6 Apr 2012 22:41:35 +0100
Subject: Fix llGetLinkPrimParams for PRIM_POS_LOCAL for child prims whether in
scene or attachments.
Return relative position to root prim rather than 0,0,0.
Should fix same issue with llGetLocalPos()
http://opensimulator.org/mantis/view.php?id=5951
---
OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 16 +++++++++++++---
1 file changed, 13 insertions(+), 3 deletions(-)
(limited to 'OpenSim/Region/Framework')
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index 9e65f5d..5ec0ed9 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -125,12 +125,14 @@ namespace OpenSim.Region.Framework.Scenes
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
///
- /// Is this sop a root part?
+ /// Is this a root part?
///
-
+ ///
+ /// This will return true even if the whole object is attached to an avatar.
+ ///
public bool IsRoot
{
- get { return ParentGroup.RootPart == this; }
+ get { return ParentGroup.RootPart == this; }
}
#region Fields
@@ -1112,6 +1114,14 @@ namespace OpenSim.Region.Framework.Scenes
}
}
+ ///
+ /// The parent ID of this part.
+ ///
+ ///
+ /// If this is a root part which is not attached to an avatar then the value will be 0.
+ /// If this is a root part which is attached to an avatar then the value is the local id of that avatar.
+ /// If this is a child part then the value is the local ID of the root part.
+ ///
public uint ParentID
{
get { return _parentID; }
--
cgit v1.1