* 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
This commit is contained in:
Teravus Ovares
2008-04-25 21:41:55 +00:00
parent 6fec9c789b
commit a534257b0e
5 changed files with 65 additions and 5 deletions

View File

@@ -103,6 +103,7 @@ namespace OpenSim.Region.Environment.Scenes
[XmlIgnore] public bool m_IsAttachment = false;
[XmlIgnore] public uint m_attachmentPoint = (byte)0;
[XmlIgnore] public LLUUID m_attachedAvatar = LLUUID.Zero;
[XmlIgnore] public LLVector3 m_attachedPos = LLVector3.Zero;
public Int32 CreationDate;
public uint ParentID = 0;
@@ -276,6 +277,15 @@ namespace OpenSim.Region.Environment.Scenes
m_groupPosition.Y = PhysActor.Position.Y;
m_groupPosition.Z = PhysActor.Position.Z;
}
if (m_IsAttachment)
{
ScenePresence sp = m_parentGroup.Scene.GetScenePresence(m_attachedAvatar);
if (sp != null)
{
return sp.AbsolutePosition;
}
}
return m_groupPosition;
}
set
@@ -340,7 +350,11 @@ namespace OpenSim.Region.Environment.Scenes
public LLVector3 AbsolutePosition
{
get { return m_offsetPosition + m_groupPosition; }
get {
if (m_IsAttachment)
return GroupPosition;
return m_offsetPosition + m_groupPosition; }
}
protected LLQuaternion m_rotationOffset;