diff options
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/SceneObjectPart.cs')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/SceneObjectPart.cs | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs index 2357c2f..6a12fb9 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs | |||
@@ -103,6 +103,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
103 | [XmlIgnore] public bool m_IsAttachment = false; | 103 | [XmlIgnore] public bool m_IsAttachment = false; |
104 | [XmlIgnore] public uint m_attachmentPoint = (byte)0; | 104 | [XmlIgnore] public uint m_attachmentPoint = (byte)0; |
105 | [XmlIgnore] public LLUUID m_attachedAvatar = LLUUID.Zero; | 105 | [XmlIgnore] public LLUUID m_attachedAvatar = LLUUID.Zero; |
106 | [XmlIgnore] public LLVector3 m_attachedPos = LLVector3.Zero; | ||
106 | 107 | ||
107 | public Int32 CreationDate; | 108 | public Int32 CreationDate; |
108 | public uint ParentID = 0; | 109 | public uint ParentID = 0; |
@@ -276,6 +277,15 @@ namespace OpenSim.Region.Environment.Scenes | |||
276 | m_groupPosition.Y = PhysActor.Position.Y; | 277 | m_groupPosition.Y = PhysActor.Position.Y; |
277 | m_groupPosition.Z = PhysActor.Position.Z; | 278 | m_groupPosition.Z = PhysActor.Position.Z; |
278 | } | 279 | } |
280 | if (m_IsAttachment) | ||
281 | { | ||
282 | ScenePresence sp = m_parentGroup.Scene.GetScenePresence(m_attachedAvatar); | ||
283 | if (sp != null) | ||
284 | { | ||
285 | return sp.AbsolutePosition; | ||
286 | } | ||
287 | } | ||
288 | |||
279 | return m_groupPosition; | 289 | return m_groupPosition; |
280 | } | 290 | } |
281 | set | 291 | set |
@@ -340,7 +350,11 @@ namespace OpenSim.Region.Environment.Scenes | |||
340 | 350 | ||
341 | public LLVector3 AbsolutePosition | 351 | public LLVector3 AbsolutePosition |
342 | { | 352 | { |
343 | get { return m_offsetPosition + m_groupPosition; } | 353 | get { |
354 | if (m_IsAttachment) | ||
355 | return GroupPosition; | ||
356 | |||
357 | return m_offsetPosition + m_groupPosition; } | ||
344 | } | 358 | } |
345 | 359 | ||
346 | protected LLQuaternion m_rotationOffset; | 360 | protected LLQuaternion m_rotationOffset; |