aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs29
1 files changed, 22 insertions, 7 deletions
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
314 /// may need to create a new Physics actor. 314 /// may need to create a new Physics actor.
315 if (dupe.RootPart.PhysActor != null) 315 if (dupe.RootPart.PhysActor != null)
316 { 316 {
317 dupe.RootPart.PhysActor = m_scene.PhysScene.AddPrim( 317 PrimitiveBaseShape pbs = dupe.RootPart.Shape;
318 new PhysicsVector(dupe.RootPart.AbsolutePosition.X, dupe.RootPart.AbsolutePosition.Y, 318
319 dupe.RootPart.AbsolutePosition.Z), 319 dupe.RootPart.PhysActor = m_scene.PhysScene.AddPrimShape(
320 new PhysicsVector(dupe.RootPart.Scale.X, dupe.RootPart.Scale.Y, dupe.RootPart.Scale.Z), 320 dupe.RootPart.Name,
321 new Quaternion(dupe.RootPart.RotationOffset.W, dupe.RootPart.RotationOffset.X, 321 pbs,
322 dupe.RootPart.RotationOffset.Y, dupe.RootPart.RotationOffset.Z)); 322 new PhysicsVector(dupe.RootPart.AbsolutePosition.X, dupe.RootPart.AbsolutePosition.Y, dupe.RootPart.AbsolutePosition.Z),
323 new PhysicsVector(dupe.RootPart.Scale.X, dupe.RootPart.Scale.Y, dupe.RootPart.Scale.Z),
324 new Axiom.Math.Quaternion(dupe.RootPart.RotationOffset.W, dupe.RootPart.RotationOffset.X,
325 dupe.RootPart.RotationOffset.Y, dupe.RootPart.RotationOffset.Z));
326
323 } 327 }
324 328
325 List<SceneObjectPart> partList = new List<SceneObjectPart>(m_parts.Values); 329 List<SceneObjectPart> partList = new List<SceneObjectPart>(m_parts.Values);
@@ -838,6 +842,17 @@ namespace OpenSim.Region.Environment.Scenes
838 { 842 {
839 part.UpdateShape(shapeBlock); 843 part.UpdateShape(shapeBlock);
840 } 844 }
845 if (m_rootPart.PhysActor != null)
846 {
847 this.m_scene.PhysScene.RemovePrim(m_rootPart.PhysActor);
848 m_rootPart.PhysActor = m_scene.PhysScene.AddPrimShape(
849 m_rootPart.Name,
850 m_rootPart.Shape,
851 new PhysicsVector(m_rootPart.AbsolutePosition.X, m_rootPart.AbsolutePosition.Y, m_rootPart.AbsolutePosition.Z),
852 new PhysicsVector(m_rootPart.Scale.X, m_rootPart.Scale.Y, m_rootPart.Scale.Z),
853 new Axiom.Math.Quaternion(m_rootPart.RotationOffset.W, m_rootPart.RotationOffset.X,
854 m_rootPart.RotationOffset.Y, m_rootPart.RotationOffset.Z));
855 }
841 } 856 }
842 857
843 #endregion 858 #endregion
@@ -1252,4 +1267,4 @@ namespace OpenSim.Region.Environment.Scenes
1252 Text = text; 1267 Text = text;
1253 } 1268 }
1254 } 1269 }
1255} \ No newline at end of file 1270}