bug fix (??) in sog copy()
parent
43dc0ee020
commit
dab7e03584
|
@ -1940,37 +1940,46 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
{
|
{
|
||||||
newPart = dupe.CopyPart(part, OwnerID, GroupID, userExposed);
|
newPart = dupe.CopyPart(part, OwnerID, GroupID, userExposed);
|
||||||
newPart.LinkNum = part.LinkNum;
|
newPart.LinkNum = part.LinkNum;
|
||||||
}
|
if (userExposed)
|
||||||
|
newPart.ParentID = dupe.m_rootPart.LocalId;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
newPart = dupe.m_rootPart;
|
newPart = dupe.m_rootPart;
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
|
bool isphys = ((newPart.Flags & PrimFlags.Physics) != 0);
|
||||||
|
bool isphan = ((newPart.Flags & PrimFlags.Phantom) != 0);
|
||||||
|
|
||||||
// Need to duplicate the physics actor as well
|
// Need to duplicate the physics actor as well
|
||||||
if (part.PhysActor != null && userExposed)
|
if (userExposed && (isphys || !isphan || newPart.VolumeDetectActive))
|
||||||
{
|
{
|
||||||
PrimitiveBaseShape pbs = newPart.Shape;
|
PrimitiveBaseShape pbs = newPart.Shape;
|
||||||
|
|
||||||
newPart.PhysActor
|
newPart.PhysActor
|
||||||
= m_scene.PhysicsScene.AddPrimShape(
|
= m_scene.PhysicsScene.AddPrimShape(
|
||||||
string.Format("{0}/{1}", newPart.Name, newPart.UUID),
|
string.Format("{0}/{1}", newPart.Name, newPart.UUID),
|
||||||
pbs,
|
pbs,
|
||||||
newPart.AbsolutePosition,
|
newPart.AbsolutePosition,
|
||||||
newPart.Scale,
|
newPart.Scale,
|
||||||
//newPart.RotationOffset,
|
|
||||||
newPart.GetWorldRotation(),
|
newPart.GetWorldRotation(),
|
||||||
part.PhysActor.IsPhysical,
|
isphys,
|
||||||
|
isphan,
|
||||||
newPart.LocalId);
|
newPart.LocalId);
|
||||||
|
|
||||||
newPart.DoPhysicsPropertyUpdate(part.PhysActor.IsPhysical, true);
|
newPart.DoPhysicsPropertyUpdate(isphys, true);
|
||||||
}
|
*/
|
||||||
|
if (userExposed)
|
||||||
|
newPart.ApplyPhysics((uint)newPart.Flags,newPart.VolumeDetectActive,true);
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
if (dupe.m_rootPart.PhysActor != null && userExposed)
|
|
||||||
dupe.m_rootPart.PhysActor.Building = false; // tell physics to finish building
|
|
||||||
|
|
||||||
if (userExposed)
|
if (userExposed)
|
||||||
{
|
{
|
||||||
dupe.UpdateParentIDs();
|
// done above dupe.UpdateParentIDs();
|
||||||
|
|
||||||
|
if (dupe.m_rootPart.PhysActor != null)
|
||||||
|
dupe.m_rootPart.PhysActor.Building = false; // tell physics to finish building
|
||||||
|
|
||||||
dupe.HasGroupChanged = true;
|
dupe.HasGroupChanged = true;
|
||||||
dupe.AttachToBackup();
|
dupe.AttachToBackup();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue