aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Environment/Scenes')
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectPart.cs17
1 files changed, 10 insertions, 7 deletions
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
index f47e4d7..27601d2 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
@@ -551,15 +551,18 @@ namespace OpenSim.Region.Environment.Scenes
551 //} 551 //}
552 //m_log.Info("[PART]: OFFSET:" + m_offsetPosition.ToString()); 552 //m_log.Info("[PART]: OFFSET:" + m_offsetPosition.ToString());
553 553
554 if (_parentID != 0) 554 if (ParentGroup != null && ParentGroup.RootPart != null)
555 { 555 {
556 Vector3 resultingposition = GetWorldPosition(); 556 if (_parentID != 0)
557 PhysActor.Position = new PhysicsVector(resultingposition.X, resultingposition.Y, resultingposition.Z); 557 {
558 Quaternion resultingrot = GetWorldRotation(); 558 Vector3 resultingposition = GetWorldPosition();
559 PhysActor.Orientation = resultingrot; 559 PhysActor.Position = new PhysicsVector(resultingposition.X, resultingposition.Y, resultingposition.Z);
560 Quaternion resultingrot = GetWorldRotation();
561 PhysActor.Orientation = resultingrot;
560 562
561 // Tell the physics engines that this prim changed. 563 // Tell the physics engines that this prim changed.
562 m_parentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(PhysActor); 564 m_parentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(PhysActor);
565 }
563 } 566 }
564 } 567 }
565 } 568 }