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
if (part.PhysActor != null && userExposed)
{
PrimitiveBaseShape pbs = part.Shape;
PrimitiveBaseShape pbs = newPart.Shape;
newPart.PhysActor
= m_scene.PhysicsScene.AddPrimShape(
part.LocalId,
string.Format("{0}/{1}", part.Name, part.UUID),
newPart.LocalId,
string.Format("{0}/{1}", newPart.Name, newPart.UUID),
pbs,
part.AbsolutePosition,
part.Scale,
part.RotationOffset,
newPart.AbsolutePosition,
newPart.Scale,
newPart.RotationOffset,
part.PhysActor.IsPhysical);
newPart.DoPhysicsPropertyUpdate(part.PhysActor.IsPhysical, true);