diff options
Update child prim group positions in moving vehicles
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneObjectPart.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index 0297a39..faa6f37 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | |||
@@ -730,9 +730,10 @@ namespace OpenSim.Region.Framework.Scenes | |||
730 | { | 730 | { |
731 | // If this is a linkset, we don't want the physics engine mucking up our group position here. | 731 | // If this is a linkset, we don't want the physics engine mucking up our group position here. |
732 | PhysicsActor actor = PhysActor; | 732 | PhysicsActor actor = PhysActor; |
733 | if (actor != null && _parentID == 0) | 733 | if (_parentID == 0) |
734 | { | 734 | { |
735 | m_groupPosition = actor.Position; | 735 | if (actor != null) |
736 | m_groupPosition = actor.Position; | ||
736 | } | 737 | } |
737 | 738 | ||
738 | if (IsAttachment) | 739 | if (IsAttachment) |
@@ -742,6 +743,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
742 | return sp.AbsolutePosition; | 743 | return sp.AbsolutePosition; |
743 | } | 744 | } |
744 | 745 | ||
746 | // use root prim's group position. Physics may have updated it | ||
747 | m_groupPosition = ParentGroup.RootPart.GroupPosition; | ||
745 | return m_groupPosition; | 748 | return m_groupPosition; |
746 | } | 749 | } |
747 | set | 750 | set |