change attachment drop, to make object Phanton. THis is not as SL, but

rez position is automatic and object interpenetrations will
 happen including with the avatar, with the usual ugly effects.
This commit is contained in:
UbitUmarov
2014-09-08 11:16:59 +01:00
parent 2d352e6348
commit 25b4e268a3

View File

@@ -701,28 +701,31 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
sp.RemoveAttachment(so);
so.FromItemID = UUID.Zero;
so.AttachedAvatar = UUID.Zero;
so.ClearPartAttachmentData();
SceneObjectPart rootPart = so.RootPart;
rootPart.SetParentLocalId(0);
so.AbsolutePosition = absolutePos;
if (absoluteRot != Quaternion.Identity)
{
so.UpdateGroupRotationR(absoluteRot);
}
so.AttachedAvatar = UUID.Zero;
rootPart.SetParentLocalId(0);
so.ClearPartAttachmentData();
rootPart.Flags &= ~PrimFlags.Phantom;
// rootPart.RemFlag(PrimFlags.TemporaryOnRez);
// rootPart.AddFlag(PrimFlags.Phantom);
// rootPart.ApplyPhysics(rootPart.GetEffectiveObjectFlags(), rootPart.VolumeDetectActive,false);
so.ApplyPhysics();
// not physical, not temporary, phaton, not volume detector
so.UpdatePrimFlags(rootPart.LocalId,false,false,true,false);
so.HasGroupChanged = true;
rootPart.Rezzed = DateTime.Now;
rootPart.RemFlag(PrimFlags.TemporaryOnRez);
so.AttachToBackup();
m_scene.EventManager.TriggerParcelPrimCountTainted();
so.ScheduleGroupForFullUpdate();
rootPart.ClearUndoState();
List<UUID> uuids = new List<UUID>();
@@ -735,6 +738,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
// Attach (NULL) stops scripts. We don't want that. Resume them.
so.ResumeScripts();
so.ScheduleGroupForFullUpdate();
}
public void DetachSingleAttachmentToInv(IScenePresence sp, SceneObjectGroup so)