diff options
author | Melanie | 2011-11-10 23:59:13 +0100 |
---|---|---|
committer | Melanie | 2011-11-10 23:59:13 +0100 |
commit | a081df75e283cf3c7ae07b598d0fca868a0110a5 (patch) | |
tree | f44737404f265bbe6da349e4b1252d0970857c7a /OpenSim/Region/Framework/Scenes | |
parent | Merge branch 'master' into bigmerge (diff) | |
download | opensim-SC-a081df75e283cf3c7ae07b598d0fca868a0110a5.zip opensim-SC-a081df75e283cf3c7ae07b598d0fca868a0110a5.tar.gz opensim-SC-a081df75e283cf3c7ae07b598d0fca868a0110a5.tar.bz2 opensim-SC-a081df75e283cf3c7ae07b598d0fca868a0110a5.tar.xz |
Prevent linking objects while they are deeded. On unlinking deeded objects,
set LastOwnerID properly so the parts cannot be transferred, circumventing
no trans perms
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneGraph.cs | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs index d780fb3..c16038c 100644 --- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs +++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs | |||
@@ -1743,6 +1743,11 @@ namespace OpenSim.Region.Framework.Scenes | |||
1743 | { | 1743 | { |
1744 | SceneObjectGroup parentGroup = root.ParentGroup; | 1744 | SceneObjectGroup parentGroup = root.ParentGroup; |
1745 | if (parentGroup == null) return; | 1745 | if (parentGroup == null) return; |
1746 | |||
1747 | // Cowardly refuse to link to a group owned root | ||
1748 | if (parentGroup.OwnerID == parentGroup.GroupID) | ||
1749 | return; | ||
1750 | |||
1746 | Monitor.Enter(m_updateLock); | 1751 | Monitor.Enter(m_updateLock); |
1747 | 1752 | ||
1748 | try | 1753 | try |
@@ -1770,11 +1775,14 @@ namespace OpenSim.Region.Framework.Scenes | |||
1770 | 1775 | ||
1771 | foreach (SceneObjectGroup child in childGroups) | 1776 | foreach (SceneObjectGroup child in childGroups) |
1772 | { | 1777 | { |
1773 | parentGroup.LinkToGroup(child); | 1778 | if (parentGroup.OwnerID == child.OwnerID) |
1779 | { | ||
1780 | parentGroup.LinkToGroup(child); | ||
1774 | 1781 | ||
1775 | // this is here so physics gets updated! | 1782 | // this is here so physics gets updated! |
1776 | // Don't remove! Bad juju! Stay away! or fix physics! | 1783 | // Don't remove! Bad juju! Stay away! or fix physics! |
1777 | child.AbsolutePosition = child.AbsolutePosition; | 1784 | child.AbsolutePosition = child.AbsolutePosition; |
1785 | } | ||
1778 | } | 1786 | } |
1779 | 1787 | ||
1780 | // We need to explicitly resend the newly link prim's object properties since no other actions | 1788 | // We need to explicitly resend the newly link prim's object properties since no other actions |
@@ -1819,9 +1827,14 @@ namespace OpenSim.Region.Framework.Scenes | |||
1819 | if (part.ParentGroup.PrimCount != 1) // Skip single | 1827 | if (part.ParentGroup.PrimCount != 1) // Skip single |
1820 | { | 1828 | { |
1821 | if (part.LinkNum < 2) // Root | 1829 | if (part.LinkNum < 2) // Root |
1830 | { | ||
1822 | rootParts.Add(part); | 1831 | rootParts.Add(part); |
1832 | } | ||
1823 | else | 1833 | else |
1834 | { | ||
1835 | part.LastOwnerID = part.ParentGroup.RootPart.LastOwnerID; | ||
1824 | childParts.Add(part); | 1836 | childParts.Add(part); |
1837 | } | ||
1825 | 1838 | ||
1826 | SceneObjectGroup group = part.ParentGroup; | 1839 | SceneObjectGroup group = part.ParentGroup; |
1827 | if (!affectedGroups.Contains(group)) | 1840 | if (!affectedGroups.Contains(group)) |