diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneObjectPart.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 28 |
1 files changed, 24 insertions, 4 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index 19e3023..a23c11e 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | |||
@@ -212,6 +212,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
212 | private Quaternion m_sitTargetOrientation = Quaternion.Identity; | 212 | private Quaternion m_sitTargetOrientation = Quaternion.Identity; |
213 | private Vector3 m_sitTargetPosition; | 213 | private Vector3 m_sitTargetPosition; |
214 | private string m_sitAnimation = "SIT"; | 214 | private string m_sitAnimation = "SIT"; |
215 | private bool m_occupied; // KF if any av is sitting on this prim | ||
215 | private string m_text = String.Empty; | 216 | private string m_text = String.Empty; |
216 | private string m_touchName = String.Empty; | 217 | private string m_touchName = String.Empty; |
217 | private readonly UndoStack<UndoState> m_undo = new UndoStack<UndoState>(5); | 218 | private readonly UndoStack<UndoState> m_undo = new UndoStack<UndoState>(5); |
@@ -512,9 +513,16 @@ namespace OpenSim.Region.Framework.Scenes | |||
512 | { | 513 | { |
513 | // If this is a linkset, we don't want the physics engine mucking up our group position here. | 514 | // If this is a linkset, we don't want the physics engine mucking up our group position here. |
514 | PhysicsActor actor = PhysActor; | 515 | PhysicsActor actor = PhysActor; |
515 | if (actor != null && _parentID == 0) | 516 | if (actor != null) |
516 | { | 517 | { |
517 | m_groupPosition = actor.Position; | 518 | if (_parentID == 0) |
519 | { | ||
520 | m_groupPosition = actor.Position; | ||
521 | } | ||
522 | else | ||
523 | { | ||
524 | m_groupPosition = ParentGroup.AbsolutePosition; // KF+Casper Update Child prims too! | ||
525 | } | ||
518 | } | 526 | } |
519 | 527 | ||
520 | if (IsAttachment) | 528 | if (IsAttachment) |
@@ -841,7 +849,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
841 | if (IsAttachment) | 849 | if (IsAttachment) |
842 | return GroupPosition; | 850 | return GroupPosition; |
843 | 851 | ||
844 | return m_offsetPosition + m_groupPosition; } | 852 | // return m_offsetPosition + m_groupPosition; } |
853 | return m_groupPosition + (m_offsetPosition * ParentGroup.RootPart.RotationOffset) ; } //KF: Rotation was ignored! | ||
845 | } | 854 | } |
846 | 855 | ||
847 | public SceneObjectGroup ParentGroup | 856 | public SceneObjectGroup ParentGroup |
@@ -993,6 +1002,13 @@ namespace OpenSim.Region.Framework.Scenes | |||
993 | get { return _flags; } | 1002 | get { return _flags; } |
994 | set { _flags = value; } | 1003 | set { _flags = value; } |
995 | } | 1004 | } |
1005 | |||
1006 | [XmlIgnore] | ||
1007 | public bool IsOccupied // KF If an av is sittingon this prim | ||
1008 | { | ||
1009 | get { return m_occupied; } | ||
1010 | set { m_occupied = value; } | ||
1011 | } | ||
996 | 1012 | ||
997 | [XmlIgnore] | 1013 | [XmlIgnore] |
998 | public UUID SitTargetAvatar | 1014 | public UUID SitTargetAvatar |
@@ -1735,9 +1751,13 @@ namespace OpenSim.Region.Framework.Scenes | |||
1735 | Quaternion parentRot = ParentGroup.RootPart.RotationOffset; | 1751 | Quaternion parentRot = ParentGroup.RootPart.RotationOffset; |
1736 | 1752 | ||
1737 | Vector3 axPos = OffsetPosition; | 1753 | Vector3 axPos = OffsetPosition; |
1738 | |||
1739 | axPos *= parentRot; | 1754 | axPos *= parentRot; |
1740 | Vector3 translationOffsetPosition = axPos; | 1755 | Vector3 translationOffsetPosition = axPos; |
1756 | |||
1757 | int tx = (int)GroupPosition.X; | ||
1758 | int ty = (int)GroupPosition.Y; | ||
1759 | int tz = (int)GroupPosition.Z; | ||
1760 | |||
1741 | return GroupPosition + translationOffsetPosition; | 1761 | return GroupPosition + translationOffsetPosition; |
1742 | } | 1762 | } |
1743 | 1763 | ||