fix duplication of physical objects for physics engines that care about the initial value of localID
parent
c7e8529122
commit
b55076990c
|
@ -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);
|
||||||
|
|
Loading…
Reference in New Issue