diff options
author | Teravus Ovares | 2008-04-25 21:41:55 +0000 |
---|---|---|
committer | Teravus Ovares | 2008-04-25 21:41:55 +0000 |
commit | a534257b0e0861bb7656389675044fa905a11bf4 (patch) | |
tree | c879b8b46c13bd5afffb660ca3154ed8a94d51ce /OpenSim/Region/Environment/Scenes/SceneObjectPart.cs | |
parent | * Check in odds and ends which remain as an attempt to get the item propertie... (diff) | |
download | opensim-SC-a534257b0e0861bb7656389675044fa905a11bf4.zip opensim-SC-a534257b0e0861bb7656389675044fa905a11bf4.tar.gz opensim-SC-a534257b0e0861bb7656389675044fa905a11bf4.tar.bz2 opensim-SC-a534257b0e0861bb7656389675044fa905a11bf4.tar.xz |
* Fixes prim crossing. See bug 1050.
* Causes the internal handling of attachments to put the prim group conceptually at the position of the avatar instead of 0,0,0
Diffstat (limited to '')
-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; |