diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index 79660a3..42ac9aa 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | |||
@@ -1449,19 +1449,25 @@ namespace OpenSim.Region.Framework.Scenes | |||
1449 | 1449 | ||
1450 | foreach (SceneObjectPart part in partList) | 1450 | foreach (SceneObjectPart part in partList) |
1451 | { | 1451 | { |
1452 | SceneObjectPart newPart; | ||
1452 | if (part.UUID != m_rootPart.UUID) | 1453 | if (part.UUID != m_rootPart.UUID) |
1453 | { | 1454 | { |
1454 | SceneObjectPart newPart = dupe.CopyPart(part, OwnerID, GroupID, userExposed); | 1455 | newPart = dupe.CopyPart(part, OwnerID, GroupID, userExposed); |
1455 | newPart.LinkNum = part.LinkNum; | 1456 | newPart.LinkNum = part.LinkNum; |
1456 | } | 1457 | } |
1458 | else | ||
1459 | { | ||
1460 | newPart = dupe.m_rootPart; | ||
1461 | } | ||
1457 | 1462 | ||
1458 | // Need to duplicate the physics actor as well | 1463 | // Need to duplicate the physics actor as well |
1459 | if (part.PhysActor != null && userExposed) | 1464 | if (part.PhysActor != null && userExposed) |
1460 | { | 1465 | { |
1461 | PrimitiveBaseShape pbs = part.Shape; | 1466 | PrimitiveBaseShape pbs = part.Shape; |
1462 | 1467 | ||
1463 | part.PhysActor | 1468 | newPart.PhysActor |
1464 | = m_scene.PhysicsScene.AddPrimShape( | 1469 | = m_scene.PhysicsScene.AddPrimShape( |
1470 | part.LocalId, | ||
1465 | string.Format("{0}/{1}", part.Name, part.UUID), | 1471 | string.Format("{0}/{1}", part.Name, part.UUID), |
1466 | pbs, | 1472 | pbs, |
1467 | part.AbsolutePosition, | 1473 | part.AbsolutePosition, |
@@ -1469,8 +1475,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1469 | part.RotationOffset, | 1475 | part.RotationOffset, |
1470 | part.PhysActor.IsPhysical); | 1476 | part.PhysActor.IsPhysical); |
1471 | 1477 | ||
1472 | part.PhysActor.LocalID = part.LocalId; | 1478 | newPart.DoPhysicsPropertyUpdate(part.PhysActor.IsPhysical, true); |
1473 | part.DoPhysicsPropertyUpdate(part.PhysActor.IsPhysical, true); | ||
1474 | } | 1479 | } |
1475 | } | 1480 | } |
1476 | 1481 | ||