From a0265300aa09be0bdd2d4629d6a22394d5b219be Mon Sep 17 00:00:00 2001 From: dan miller Date: Sat, 29 Sep 2007 03:56:36 +0000 Subject: Hollow prims (box only), thanks Gerard! Enjoy --- .../Region/Environment/Scenes/SceneObjectGroup.cs | 29 ++++++++++++++++------ 1 file changed, 22 insertions(+), 7 deletions(-) (limited to 'OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs') diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs index 890008d..da9f366 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs @@ -314,12 +314,16 @@ namespace OpenSim.Region.Environment.Scenes /// may need to create a new Physics actor. if (dupe.RootPart.PhysActor != null) { - dupe.RootPart.PhysActor = m_scene.PhysScene.AddPrim( - new PhysicsVector(dupe.RootPart.AbsolutePosition.X, dupe.RootPart.AbsolutePosition.Y, - dupe.RootPart.AbsolutePosition.Z), - new PhysicsVector(dupe.RootPart.Scale.X, dupe.RootPart.Scale.Y, dupe.RootPart.Scale.Z), - new Quaternion(dupe.RootPart.RotationOffset.W, dupe.RootPart.RotationOffset.X, - dupe.RootPart.RotationOffset.Y, dupe.RootPart.RotationOffset.Z)); + PrimitiveBaseShape pbs = dupe.RootPart.Shape; + + dupe.RootPart.PhysActor = m_scene.PhysScene.AddPrimShape( + dupe.RootPart.Name, + pbs, + new PhysicsVector(dupe.RootPart.AbsolutePosition.X, dupe.RootPart.AbsolutePosition.Y, dupe.RootPart.AbsolutePosition.Z), + new PhysicsVector(dupe.RootPart.Scale.X, dupe.RootPart.Scale.Y, dupe.RootPart.Scale.Z), + new Axiom.Math.Quaternion(dupe.RootPart.RotationOffset.W, dupe.RootPart.RotationOffset.X, + dupe.RootPart.RotationOffset.Y, dupe.RootPart.RotationOffset.Z)); + } List partList = new List(m_parts.Values); @@ -838,6 +842,17 @@ namespace OpenSim.Region.Environment.Scenes { part.UpdateShape(shapeBlock); } + if (m_rootPart.PhysActor != null) + { + this.m_scene.PhysScene.RemovePrim(m_rootPart.PhysActor); + m_rootPart.PhysActor = m_scene.PhysScene.AddPrimShape( + m_rootPart.Name, + m_rootPart.Shape, + new PhysicsVector(m_rootPart.AbsolutePosition.X, m_rootPart.AbsolutePosition.Y, m_rootPart.AbsolutePosition.Z), + new PhysicsVector(m_rootPart.Scale.X, m_rootPart.Scale.Y, m_rootPart.Scale.Z), + new Axiom.Math.Quaternion(m_rootPart.RotationOffset.W, m_rootPart.RotationOffset.X, + m_rootPart.RotationOffset.Y, m_rootPart.RotationOffset.Z)); + } } #endregion @@ -1252,4 +1267,4 @@ namespace OpenSim.Region.Environment.Scenes Text = text; } } -} \ No newline at end of file +} -- cgit v1.1