aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs35
1 files changed, 31 insertions, 4 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
index 2c7cd40..0361741 100644
--- a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
@@ -710,13 +710,19 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
710 so.AttachedAvatar = UUID.Zero; 710 so.AttachedAvatar = UUID.Zero;
711 rootPart.SetParentLocalId(0); 711 rootPart.SetParentLocalId(0);
712 so.ClearPartAttachmentData(); 712 so.ClearPartAttachmentData();
713 rootPart.ApplyPhysics(rootPart.GetEffectiveObjectFlags(), rootPart.VolumeDetectActive,false); 713
714 rootPart.Flags &= ~PrimFlags.Phantom;
715// rootPart.ApplyPhysics(rootPart.GetEffectiveObjectFlags(), rootPart.VolumeDetectActive,false);
716 so.ApplyPhysics();
717
714 so.HasGroupChanged = true; 718 so.HasGroupChanged = true;
715 rootPart.Rezzed = DateTime.Now; 719 rootPart.Rezzed = DateTime.Now;
716 rootPart.RemFlag(PrimFlags.TemporaryOnRez); 720 rootPart.RemFlag(PrimFlags.TemporaryOnRez);
717 so.AttachToBackup(); 721 so.AttachToBackup();
718 m_scene.EventManager.TriggerParcelPrimCountTainted(); 722 m_scene.EventManager.TriggerParcelPrimCountTainted();
719 rootPart.ScheduleFullUpdate(); 723
724 so.ScheduleGroupForFullUpdate();
725
720 rootPart.ClearUndoState(); 726 rootPart.ClearUndoState();
721 727
722 List<UUID> uuids = new List<UUID>(); 728 List<UUID> uuids = new List<UUID>();
@@ -907,8 +913,29 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
907 913
908 so.AttachedAvatar = sp.UUID; 914 so.AttachedAvatar = sp.UUID;
909 915
910 if (so.RootPart.PhysActor != null) 916// if (so.RootPart.PhysActor != null)
911 so.RootPart.RemoveFromPhysics(); 917// so.RootPart.RemoveFromPhysics();
918
919 foreach (SceneObjectPart part in so.Parts)
920 {
921 if (part.KeyframeMotion != null)
922 {
923 part.KeyframeMotion.Delete();
924 part.KeyframeMotion = null;
925 }
926
927// if (part.IsJoint() && ((part.Flags & PrimFlags.Physics) != 0))
928// {
929// PhysicsScene.RequestJointDeletion(part.Name); // FIXME: what if the name changed?
930// }
931// else
932 if (part.PhysActor != null)
933 {
934 part.RemoveFromPhysics();
935 }
936 }
937
938 so.RootPart.Flags &= ~PrimFlags.Physics;
912 939
913 so.AbsolutePosition = attachOffset; 940 so.AbsolutePosition = attachOffset;
914 so.RootPart.AttachedPos = attachOffset; 941 so.RootPart.AttachedPos = attachOffset;