aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
diff options
context:
space:
mode:
authorMelanie Thielker2008-10-03 21:44:33 +0000
committerMelanie Thielker2008-10-03 21:44:33 +0000
commitab260b5d23da0cf02973583bd869ad8901d63b92 (patch)
treee0c9b068900bc05ef34789bd04fafade85e464ae /OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
parentDisabled some thread aborts in the IRC module that I added earlier and don't ... (diff)
downloadopensim-SC_OLD-ab260b5d23da0cf02973583bd869ad8901d63b92.zip
opensim-SC_OLD-ab260b5d23da0cf02973583bd869ad8901d63b92.tar.gz
opensim-SC_OLD-ab260b5d23da0cf02973583bd869ad8901d63b92.tar.bz2
opensim-SC_OLD-ab260b5d23da0cf02973583bd869ad8901d63b92.tar.xz
Fix: Mantis#2326: Fix: privilege escalation through attach from ground
Fix: objects being duplicated inventory on detach. Fix: Mad jumping around of attachments while editing. Fix: Attachments being persisted to database on login. Fix: Attachments being persisted when changed by a script like invisprim refresh. Fix: Attachpoint set, but not reset correctly. Fix: prevent spurious full updates while editing attachments. Several other fixes
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs')
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs34
1 files changed, 21 insertions, 13 deletions
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
index c779a5d..6cd0bae 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
@@ -734,16 +734,18 @@ namespace OpenSim.Region.Environment.Scenes
734 m_rootPart.IsAttachment = true; 734 m_rootPart.IsAttachment = true;
735 735
736 m_rootPart.SetParentLocalId(avatar.LocalId); 736 m_rootPart.SetParentLocalId(avatar.LocalId);
737 lock (m_parts) 737 SetAttachmentPoint(Convert.ToByte(attachmentpoint));
738 {
739 foreach (SceneObjectPart part in m_parts.Values)
740 {
741 part.SetAttachmentPoint(attachmentpoint);
742 }
743 }
744 738
745 avatar.AddAttachment(this); 739 avatar.AddAttachment(this);
746 m_rootPart.ScheduleFullUpdate(); 740 // Killing it here will cause the client to deselect it
741 // It then reappears on the avatar, deselected
742 // through the full update below
743 //
744 foreach (SceneObjectPart part in m_parts.Values)
745 m_scene.SendKiPrimitive(part.LocalId);
746
747 IsSelected = false; // fudge....
748 ScheduleGroupForFullUpdate();
747 } 749 }
748 } 750 }
749 public byte GetAttachmentPoint() 751 public byte GetAttachmentPoint()
@@ -757,10 +759,7 @@ namespace OpenSim.Region.Environment.Scenes
757 759
758 public void ClearPartAttachmentData() 760 public void ClearPartAttachmentData()
759 { 761 {
760 foreach (SceneObjectPart part in m_parts.Values) 762 SetAttachmentPoint((Byte)0);
761 {
762 part.SetAttachmentPoint((Byte)0);
763 }
764 } 763 }
765 764
766 public void DetachToGround() 765 public void DetachToGround()
@@ -775,7 +774,7 @@ namespace OpenSim.Region.Environment.Scenes
775 AbsolutePosition = detachedpos; 774 AbsolutePosition = detachedpos;
776 m_rootPart.AttachedAvatar = UUID.Zero; 775 m_rootPart.AttachedAvatar = UUID.Zero;
777 m_rootPart.SetParentLocalId(0); 776 m_rootPart.SetParentLocalId(0);
778 m_rootPart.SetAttachmentPoint((byte)0); 777 SetAttachmentPoint((byte)0);
779 m_rootPart.IsAttachment = false; 778 m_rootPart.IsAttachment = false;
780 m_rootPart.ApplyPhysics(m_rootPart.GetEffectiveObjectFlags(), m_scene.m_physicalPrim); 779 m_rootPart.ApplyPhysics(m_rootPart.GetEffectiveObjectFlags(), m_scene.m_physicalPrim);
781 HasGroupChanged = true; 780 HasGroupChanged = true;
@@ -2755,5 +2754,14 @@ namespace OpenSim.Region.Environment.Scenes
2755 { 2754 {
2756 return String.Format("{0} {1} ({2})", Name, UUID, AbsolutePosition); 2755 return String.Format("{0} {1} ({2})", Name, UUID, AbsolutePosition);
2757 } 2756 }
2757
2758 public void SetAttachmentPoint(byte point)
2759 {
2760 lock(m_parts)
2761 {
2762 foreach (SceneObjectPart part in m_parts.Values)
2763 part.SetAttachmentPoint(point);
2764 }
2765 }
2758 } 2766 }
2759} 2767}