diff options
author | Melanie | 2011-11-11 00:28:12 +0000 |
---|---|---|
committer | Melanie | 2011-11-11 00:28:12 +0000 |
commit | a5838cf0a689facd58bc17f11ed6c312ef541aab (patch) | |
tree | d7ece3e7a10021b963cb9bbdf09fa388112300ff /OpenSim/Region | |
parent | Merge branch 'master' of melanie@opensimulator.org:/var/git/opensim (diff) | |
download | opensim-SC-a5838cf0a689facd58bc17f11ed6c312ef541aab.zip opensim-SC-a5838cf0a689facd58bc17f11ed6c312ef541aab.tar.gz opensim-SC-a5838cf0a689facd58bc17f11ed6c312ef541aab.tar.bz2 opensim-SC-a5838cf0a689facd58bc17f11ed6c312ef541aab.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 'OpenSim/Region')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneGraph.cs | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs index b2e5dc3..743fd50 100644 --- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs +++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs | |||
@@ -1661,6 +1661,13 @@ namespace OpenSim.Region.Framework.Scenes | |||
1661 | /// <param name="childPrims"></param> | 1661 | /// <param name="childPrims"></param> |
1662 | protected internal void LinkObjects(SceneObjectPart root, List<SceneObjectPart> children) | 1662 | protected internal void LinkObjects(SceneObjectPart root, List<SceneObjectPart> children) |
1663 | { | 1663 | { |
1664 | SceneObjectGroup parentGroup = root.ParentGroup; | ||
1665 | if (parentGroup == null) return; | ||
1666 | |||
1667 | // Cowardly refuse to link to a group owned root | ||
1668 | if (parentGroup.OwnerID == parentGroup.GroupID) | ||
1669 | return; | ||
1670 | |||
1664 | Monitor.Enter(m_updateLock); | 1671 | Monitor.Enter(m_updateLock); |
1665 | try | 1672 | try |
1666 | { | 1673 | { |
@@ -1683,11 +1690,14 @@ namespace OpenSim.Region.Framework.Scenes | |||
1683 | 1690 | ||
1684 | foreach (SceneObjectGroup child in childGroups) | 1691 | foreach (SceneObjectGroup child in childGroups) |
1685 | { | 1692 | { |
1686 | parentGroup.LinkToGroup(child); | 1693 | if (parentGroup.OwnerID == child.OwnerID) |
1694 | { | ||
1695 | parentGroup.LinkToGroup(child); | ||
1687 | 1696 | ||
1688 | // this is here so physics gets updated! | 1697 | // this is here so physics gets updated! |
1689 | // Don't remove! Bad juju! Stay away! or fix physics! | 1698 | // Don't remove! Bad juju! Stay away! or fix physics! |
1690 | child.AbsolutePosition = child.AbsolutePosition; | 1699 | child.AbsolutePosition = child.AbsolutePosition; |
1700 | } | ||
1691 | } | 1701 | } |
1692 | 1702 | ||
1693 | // We need to explicitly resend the newly link prim's object properties since no other actions | 1703 | // We need to explicitly resend the newly link prim's object properties since no other actions |
@@ -1725,9 +1735,14 @@ namespace OpenSim.Region.Framework.Scenes | |||
1725 | if (part.ParentGroup.PrimCount != 1) // Skip single | 1735 | if (part.ParentGroup.PrimCount != 1) // Skip single |
1726 | { | 1736 | { |
1727 | if (part.LinkNum < 2) // Root | 1737 | if (part.LinkNum < 2) // Root |
1738 | { | ||
1728 | rootParts.Add(part); | 1739 | rootParts.Add(part); |
1740 | } | ||
1729 | else | 1741 | else |
1742 | { | ||
1743 | part.LastOwnerID = part.ParentGroup.RootPart.LastOwnerID; | ||
1730 | childParts.Add(part); | 1744 | childParts.Add(part); |
1745 | } | ||
1731 | 1746 | ||
1732 | SceneObjectGroup group = part.ParentGroup; | 1747 | SceneObjectGroup group = part.ParentGroup; |
1733 | if (!affectedGroups.Contains(group)) | 1748 | if (!affectedGroups.Contains(group)) |