aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework
diff options
context:
space:
mode:
authorroot2011-07-15 20:07:59 +0100
committerroot2011-07-15 20:07:59 +0100
commite9dbe54ab1217e4310b0e7e014516363237e2a21 (patch)
treea7dc65799c92dc288c8d4d3d6c6f0c4adc824380 /OpenSim/Region/Framework
parentfix duplication of physical objects for physics engines that care about the i... (diff)
downloadopensim-SC_OLD-e9dbe54ab1217e4310b0e7e014516363237e2a21.zip
opensim-SC_OLD-e9dbe54ab1217e4310b0e7e014516363237e2a21.tar.gz
opensim-SC_OLD-e9dbe54ab1217e4310b0e7e014516363237e2a21.tar.bz2
opensim-SC_OLD-e9dbe54ab1217e4310b0e7e014516363237e2a21.tar.xz
Fix some local id issues in physics glue
Diffstat (limited to 'OpenSim/Region/Framework')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs4
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPart.cs32
2 files changed, 22 insertions, 14 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
index 343a8fd..0fbd746 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
@@ -1467,13 +1467,13 @@ namespace OpenSim.Region.Framework.Scenes
1467 1467
1468 newPart.PhysActor 1468 newPart.PhysActor
1469 = m_scene.PhysicsScene.AddPrimShape( 1469 = m_scene.PhysicsScene.AddPrimShape(
1470 newPart.LocalId,
1471 string.Format("{0}/{1}", newPart.Name, newPart.UUID), 1470 string.Format("{0}/{1}", newPart.Name, newPart.UUID),
1472 pbs, 1471 pbs,
1473 newPart.AbsolutePosition, 1472 newPart.AbsolutePosition,
1474 newPart.Scale, 1473 newPart.Scale,
1475 newPart.RotationOffset, 1474 newPart.RotationOffset,
1476 part.PhysActor.IsPhysical); 1475 part.PhysActor.IsPhysical,
1476 newPart.LocalId);
1477 1477
1478 newPart.DoPhysicsPropertyUpdate(part.PhysActor.IsPhysical, true); 1478 newPart.DoPhysicsPropertyUpdate(part.PhysActor.IsPhysical, true);
1479 } 1479 }
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index e9571aa..7604510 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -1588,17 +1588,23 @@ namespace OpenSim.Region.Framework.Scenes
1588 // or flexible 1588 // or flexible
1589 if (!isPhantom && !IsAttachment && !(Shape.PathCurve == (byte) Extrusion.Flexible)) 1589 if (!isPhantom && !IsAttachment && !(Shape.PathCurve == (byte) Extrusion.Flexible))
1590 { 1590 {
1591// m_log.DebugFormat("[SCENE OBJECT PART]: Creating PhysActor for {0} {1} {2}", Name, LocalId, UUID); 1591 try
1592 1592 {
1593 PhysActor = m_parentGroup.Scene.PhysicsScene.AddPrimShape( 1593 PhysActor = m_parentGroup.Scene.PhysicsScene.AddPrimShape(
1594 LocalId, 1594 string.Format("{0}/{1}", Name, UUID),
1595 string.Format("{0}/{1}", Name, UUID), 1595 Shape,
1596 Shape, 1596 AbsolutePosition,
1597 AbsolutePosition, 1597 Scale,
1598 Scale, 1598 RotationOffset,
1599 RotationOffset, 1599 RigidBody,
1600 RigidBody); 1600 m_localId);
1601 1601 PhysActor.SetMaterial(Material);
1602 }
1603 catch
1604 {
1605 m_log.ErrorFormat("[SCENE]: caught exception meshing object {0}. Object set to phantom.", m_uuid);
1606 PhysActor = null;
1607 }
1602 // Basic Physics returns null.. joy joy joy. 1608 // Basic Physics returns null.. joy joy joy.
1603 if (PhysActor != null) 1609 if (PhysActor != null)
1604 { 1610 {
@@ -4446,7 +4452,9 @@ namespace OpenSim.Region.Framework.Scenes
4446 AbsolutePosition, 4452 AbsolutePosition,
4447 Scale, 4453 Scale,
4448 RotationOffset, 4454 RotationOffset,
4449 UsePhysics); 4455 UsePhysics,
4456 m_localId);
4457 PhysActor.SetMaterial(Material);
4450 4458
4451 pa = PhysActor; 4459 pa = PhysActor;
4452 if (pa != null) 4460 if (pa != null)