fix duplication of physical objects for physics engines that care about the initial value of localID

bulletsim
Robert Adams 2011-07-14 12:38:35 -07:00 committed by Dan Lake
parent c7e8529122
commit b55076990c
1 changed files with 6 additions and 6 deletions

View File

@ -1463,16 +1463,16 @@ namespace OpenSim.Region.Framework.Scenes
// Need to duplicate the physics actor as well // Need to duplicate the physics actor as well
if (part.PhysActor != null && userExposed) if (part.PhysActor != null && userExposed)
{ {
PrimitiveBaseShape pbs = part.Shape; PrimitiveBaseShape pbs = newPart.Shape;
newPart.PhysActor newPart.PhysActor
= m_scene.PhysicsScene.AddPrimShape( = m_scene.PhysicsScene.AddPrimShape(
part.LocalId, newPart.LocalId,
string.Format("{0}/{1}", part.Name, part.UUID), string.Format("{0}/{1}", newPart.Name, newPart.UUID),
pbs, pbs,
part.AbsolutePosition, newPart.AbsolutePosition,
part.Scale, newPart.Scale,
part.RotationOffset, newPart.RotationOffset,
part.PhysActor.IsPhysical); part.PhysActor.IsPhysical);
newPart.DoPhysicsPropertyUpdate(part.PhysActor.IsPhysical, true); newPart.DoPhysicsPropertyUpdate(part.PhysActor.IsPhysical, true);