From cc290abf7a2bd651205e8978a095cb83ffeddcf7 Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Tue, 14 Sep 2010 22:13:44 +0200 Subject: Adjust the code for ghost prim removal to new information from Kitto --- OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs') diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index 37630e0..e933e77 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs @@ -1789,11 +1789,15 @@ namespace OpenSim.Region.Framework.Scenes if (m_rootPart.PhysActor != null && (!m_rootPart.PhysActor.IsPhysical)) { + // Possible ghost prim if (m_rootPart.PhysActor.Position != m_rootPart.GroupPosition) { - m_rootPart.PhysActor.Position = m_rootPart.GroupPosition; - m_rootPart.PhysActor.Orientation = m_rootPart.RotationOffset; - m_scene.PhysicsScene.AddPhysicsActorTaint(m_rootPart.PhysActor); + foreach (SceneObjectPart part in Children.Values) + { + // Re-set physics actor positions and + // orientations + part.GroupPosition = m_rootPart.GroupPosition; + } } } // m_log.DebugFormat( -- cgit v1.1