*NEEDS more testing* on attachment drop: fix adding prims to physics
engine, remove disturbing phantom flag. On attach: fix removing prims from physics engine, delete any keyframeMotion, remove physical flag. This is executed in all attachs possible only need on attach from the scene (?), but its where original code removed only root part from physics engineavinationmerge
parent
cf1d58d164
commit
2d352e6348
|
@ -710,13 +710,19 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
|
|||
so.AttachedAvatar = UUID.Zero;
|
||||
rootPart.SetParentLocalId(0);
|
||||
so.ClearPartAttachmentData();
|
||||
rootPart.ApplyPhysics(rootPart.GetEffectiveObjectFlags(), rootPart.VolumeDetectActive,false);
|
||||
|
||||
rootPart.Flags &= ~PrimFlags.Phantom;
|
||||
// rootPart.ApplyPhysics(rootPart.GetEffectiveObjectFlags(), rootPart.VolumeDetectActive,false);
|
||||
so.ApplyPhysics();
|
||||
|
||||
so.HasGroupChanged = true;
|
||||
rootPart.Rezzed = DateTime.Now;
|
||||
rootPart.RemFlag(PrimFlags.TemporaryOnRez);
|
||||
so.AttachToBackup();
|
||||
m_scene.EventManager.TriggerParcelPrimCountTainted();
|
||||
rootPart.ScheduleFullUpdate();
|
||||
|
||||
so.ScheduleGroupForFullUpdate();
|
||||
|
||||
rootPart.ClearUndoState();
|
||||
|
||||
List<UUID> uuids = new List<UUID>();
|
||||
|
@ -907,8 +913,29 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
|
|||
|
||||
so.AttachedAvatar = sp.UUID;
|
||||
|
||||
if (so.RootPart.PhysActor != null)
|
||||
so.RootPart.RemoveFromPhysics();
|
||||
// if (so.RootPart.PhysActor != null)
|
||||
// so.RootPart.RemoveFromPhysics();
|
||||
|
||||
foreach (SceneObjectPart part in so.Parts)
|
||||
{
|
||||
if (part.KeyframeMotion != null)
|
||||
{
|
||||
part.KeyframeMotion.Delete();
|
||||
part.KeyframeMotion = null;
|
||||
}
|
||||
|
||||
// if (part.IsJoint() && ((part.Flags & PrimFlags.Physics) != 0))
|
||||
// {
|
||||
// PhysicsScene.RequestJointDeletion(part.Name); // FIXME: what if the name changed?
|
||||
// }
|
||||
// else
|
||||
if (part.PhysActor != null)
|
||||
{
|
||||
part.RemoveFromPhysics();
|
||||
}
|
||||
}
|
||||
|
||||
so.RootPart.Flags &= ~PrimFlags.Physics;
|
||||
|
||||
so.AbsolutePosition = attachOffset;
|
||||
so.RootPart.AttachedPos = attachOffset;
|
||||
|
|
Loading…
Reference in New Issue