From b16f4024dbf89e2a9a30232fe0be452c0e722b90 Mon Sep 17 00:00:00 2001 From: Melanie Date: Fri, 24 Dec 2010 21:04:10 +0100 Subject: Update child prim group positions in moving vehicles --- OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'OpenSim') 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 { // If this is a linkset, we don't want the physics engine mucking up our group position here. PhysicsActor actor = PhysActor; - if (actor != null && _parentID == 0) + if (_parentID == 0) { - m_groupPosition = actor.Position; + if (actor != null) + m_groupPosition = actor.Position; } if (IsAttachment) @@ -742,6 +743,8 @@ namespace OpenSim.Region.Framework.Scenes return sp.AbsolutePosition; } + // use root prim's group position. Physics may have updated it + m_groupPosition = ParentGroup.RootPart.GroupPosition; return m_groupPosition; } set -- cgit v1.1