From acce65457cdff0641a0605aa0c5f3b6c37617107 Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Sat, 11 Oct 2008 23:59:46 +0000 Subject: [PATCH] Fix the fix. Child prims were failing to load. --- .../Environment/Scenes/SceneObjectPart.cs | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs index f47e4d70b0..27601d271e 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs @@ -551,15 +551,18 @@ namespace OpenSim.Region.Environment.Scenes //} //m_log.Info("[PART]: OFFSET:" + m_offsetPosition.ToString()); - if (_parentID != 0) + if (ParentGroup != null && ParentGroup.RootPart != null) { - Vector3 resultingposition = GetWorldPosition(); - PhysActor.Position = new PhysicsVector(resultingposition.X, resultingposition.Y, resultingposition.Z); - Quaternion resultingrot = GetWorldRotation(); - PhysActor.Orientation = resultingrot; + if (_parentID != 0) + { + Vector3 resultingposition = GetWorldPosition(); + PhysActor.Position = new PhysicsVector(resultingposition.X, resultingposition.Y, resultingposition.Z); + Quaternion resultingrot = GetWorldRotation(); + PhysActor.Orientation = resultingrot; - // Tell the physics engines that this prim changed. - m_parentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(PhysActor); + // Tell the physics engines that this prim changed. + m_parentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(PhysActor); + } } } }