aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs13
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPart.cs4
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs2
3 files changed, 12 insertions, 7 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
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index a215b20..c6d8c73 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -1582,6 +1582,7 @@ namespace OpenSim.Region.Framework.Scenes
1582 if (!isPhantom && !IsAttachment && !(Shape.PathCurve == (byte) Extrusion.Flexible)) 1582 if (!isPhantom && !IsAttachment && !(Shape.PathCurve == (byte) Extrusion.Flexible))
1583 { 1583 {
1584 PhysActor = m_parentGroup.Scene.PhysicsScene.AddPrimShape( 1584 PhysActor = m_parentGroup.Scene.PhysicsScene.AddPrimShape(
1585 LocalId,
1585 string.Format("{0}/{1}", Name, UUID), 1586 string.Format("{0}/{1}", Name, UUID),
1586 Shape, 1587 Shape,
1587 AbsolutePosition, 1588 AbsolutePosition,
@@ -1594,7 +1595,6 @@ namespace OpenSim.Region.Framework.Scenes
1594 { 1595 {
1595 PhysActor.SOPName = this.Name; // save object name and desc into the PhysActor so ODE internals know the joint/body info 1596 PhysActor.SOPName = this.Name; // save object name and desc into the PhysActor so ODE internals know the joint/body info
1596 PhysActor.SOPDescription = this.Description; 1597 PhysActor.SOPDescription = this.Description;
1597 PhysActor.LocalID = LocalId;
1598 DoPhysicsPropertyUpdate(RigidBody, true); 1598 DoPhysicsPropertyUpdate(RigidBody, true);
1599 PhysActor.SetVolumeDetect(VolumeDetectActive ? 1 : 0); 1599 PhysActor.SetVolumeDetect(VolumeDetectActive ? 1 : 0);
1600 } 1600 }
@@ -4410,6 +4410,7 @@ namespace OpenSim.Region.Framework.Scenes
4410 { 4410 {
4411 // It's not phantom anymore. So make sure the physics engine get's knowledge of it 4411 // It's not phantom anymore. So make sure the physics engine get's knowledge of it
4412 PhysActor = m_parentGroup.Scene.PhysicsScene.AddPrimShape( 4412 PhysActor = m_parentGroup.Scene.PhysicsScene.AddPrimShape(
4413 LocalId,
4413 string.Format("{0}/{1}", Name, UUID), 4414 string.Format("{0}/{1}", Name, UUID),
4414 Shape, 4415 Shape,
4415 AbsolutePosition, 4416 AbsolutePosition,
@@ -4420,7 +4421,6 @@ namespace OpenSim.Region.Framework.Scenes
4420 pa = PhysActor; 4421 pa = PhysActor;
4421 if (pa != null) 4422 if (pa != null)
4422 { 4423 {
4423 pa.LocalID = LocalId;
4424 DoPhysicsPropertyUpdate(UsePhysics, true); 4424 DoPhysicsPropertyUpdate(UsePhysics, true);
4425 if (m_parentGroup != null) 4425 if (m_parentGroup != null)
4426 { 4426 {
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index f6295b1..80aafd0 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -3295,7 +3295,7 @@ namespace OpenSim.Region.Framework.Scenes
3295 Vector3 pVec = AbsolutePosition; 3295 Vector3 pVec = AbsolutePosition;
3296 3296
3297 // Old bug where the height was in centimeters instead of meters 3297 // Old bug where the height was in centimeters instead of meters
3298 m_physicsActor = scene.AddAvatar(Firstname + "." + Lastname, pVec, 3298 m_physicsActor = scene.AddAvatar(LocalId, Firstname + "." + Lastname, pVec,
3299 new Vector3(0f, 0f, m_appearance.AvatarHeight), isFlying); 3299 new Vector3(0f, 0f, m_appearance.AvatarHeight), isFlying);
3300 3300
3301 scene.AddPhysicsActorTaint(m_physicsActor); 3301 scene.AddPhysicsActorTaint(m_physicsActor);