aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorUbitUmarov2014-09-08 11:16:59 +0100
committerUbitUmarov2014-09-08 11:16:59 +0100
commit25b4e268a3cb48e3b9c85dfe7887bb1fbbdb0a1c (patch)
tree9dab086024fefe04592695c691853a739efe4d4e
parent*NEEDS more testing* on attachment drop: fix adding prims to physics (diff)
downloadopensim-SC-25b4e268a3cb48e3b9c85dfe7887bb1fbbdb0a1c.zip
opensim-SC-25b4e268a3cb48e3b9c85dfe7887bb1fbbdb0a1c.tar.gz
opensim-SC-25b4e268a3cb48e3b9c85dfe7887bb1fbbdb0a1c.tar.bz2
opensim-SC-25b4e268a3cb48e3b9c85dfe7887bb1fbbdb0a1c.tar.xz
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.
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs20
1 files changed, 12 insertions, 8 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
index 0361741..414bae6 100644
--- a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
@@ -701,28 +701,31 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
701 sp.RemoveAttachment(so); 701 sp.RemoveAttachment(so);
702 so.FromItemID = UUID.Zero; 702 so.FromItemID = UUID.Zero;
703 703
704 so.AttachedAvatar = UUID.Zero;
705 so.ClearPartAttachmentData();
706
704 SceneObjectPart rootPart = so.RootPart; 707 SceneObjectPart rootPart = so.RootPart;
708
709 rootPart.SetParentLocalId(0);
705 so.AbsolutePosition = absolutePos; 710 so.AbsolutePosition = absolutePos;
706 if (absoluteRot != Quaternion.Identity) 711 if (absoluteRot != Quaternion.Identity)
707 { 712 {
708 so.UpdateGroupRotationR(absoluteRot); 713 so.UpdateGroupRotationR(absoluteRot);
709 } 714 }
710 so.AttachedAvatar = UUID.Zero;
711 rootPart.SetParentLocalId(0);
712 so.ClearPartAttachmentData();
713 715
714 rootPart.Flags &= ~PrimFlags.Phantom; 716// rootPart.RemFlag(PrimFlags.TemporaryOnRez);
717// rootPart.AddFlag(PrimFlags.Phantom);
718
715// rootPart.ApplyPhysics(rootPart.GetEffectiveObjectFlags(), rootPart.VolumeDetectActive,false); 719// rootPart.ApplyPhysics(rootPart.GetEffectiveObjectFlags(), rootPart.VolumeDetectActive,false);
716 so.ApplyPhysics(); 720
721 // not physical, not temporary, phaton, not volume detector
722 so.UpdatePrimFlags(rootPart.LocalId,false,false,true,false);
717 723
718 so.HasGroupChanged = true; 724 so.HasGroupChanged = true;
719 rootPart.Rezzed = DateTime.Now; 725 rootPart.Rezzed = DateTime.Now;
720 rootPart.RemFlag(PrimFlags.TemporaryOnRez);
721 so.AttachToBackup(); 726 so.AttachToBackup();
722 m_scene.EventManager.TriggerParcelPrimCountTainted(); 727 m_scene.EventManager.TriggerParcelPrimCountTainted();
723 728
724 so.ScheduleGroupForFullUpdate();
725
726 rootPart.ClearUndoState(); 729 rootPart.ClearUndoState();
727 730
728 List<UUID> uuids = new List<UUID>(); 731 List<UUID> uuids = new List<UUID>();
@@ -735,6 +738,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
735 738
736 // Attach (NULL) stops scripts. We don't want that. Resume them. 739 // Attach (NULL) stops scripts. We don't want that. Resume them.
737 so.ResumeScripts(); 740 so.ResumeScripts();
741 so.ScheduleGroupForFullUpdate();
738 } 742 }
739 743
740 public void DetachSingleAttachmentToInv(IScenePresence sp, SceneObjectGroup so) 744 public void DetachSingleAttachmentToInv(IScenePresence sp, SceneObjectGroup so)