diff options
author | Melanie | 2010-04-30 11:49:16 +0100 |
---|---|---|
committer | Melanie | 2010-04-30 11:49:16 +0100 |
commit | 7dc5ebc9290cc78babee6032b0d1606d6a7848cf (patch) | |
tree | 284b6ac7d547fcc4357343336d5fc66076e6085d /OpenSim | |
parent | Treat a UserLevel of -1 as an unverified account and refer them to their (diff) | |
parent | Merge branch '0.6.9-post-fixes' into careminster (diff) | |
download | opensim-SC-7dc5ebc9290cc78babee6032b0d1606d6a7848cf.zip opensim-SC-7dc5ebc9290cc78babee6032b0d1606d6a7848cf.tar.gz opensim-SC-7dc5ebc9290cc78babee6032b0d1606d6a7848cf.tar.bz2 opensim-SC-7dc5ebc9290cc78babee6032b0d1606d6a7848cf.tar.xz |
Merge branch 'careminster' into careminster-presence-refactor
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Framework/IClientAPI.cs | 2 | ||||
-rw-r--r-- | OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | 2 | ||||
-rw-r--r-- | OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs | 4 | ||||
-rw-r--r-- | OpenSim/Region/DataSnapshot/ObjectSnapshot.cs | 2 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | 50 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.cs | 8 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneGraph.cs | 41 |
7 files changed, 68 insertions, 41 deletions
diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs index af88c4a..01daeb1 100644 --- a/OpenSim/Framework/IClientAPI.cs +++ b/OpenSim/Framework/IClientAPI.cs | |||
@@ -73,7 +73,7 @@ namespace OpenSim.Framework | |||
73 | 73 | ||
74 | public delegate void LinkObjects(IClientAPI remoteClient, uint parent, List<uint> children); | 74 | public delegate void LinkObjects(IClientAPI remoteClient, uint parent, List<uint> children); |
75 | 75 | ||
76 | public delegate void DelinkObjects(List<uint> primIds); | 76 | public delegate void DelinkObjects(List<uint> primIds, IClientAPI client); |
77 | 77 | ||
78 | public delegate void RequestMapBlocks(IClientAPI remoteClient, int minX, int minY, int maxX, int maxY, uint flag); | 78 | public delegate void RequestMapBlocks(IClientAPI remoteClient, int minX, int minY, int maxX, int maxY, uint flag); |
79 | 79 | ||
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index 3262419..394d4e2 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | |||
@@ -6138,7 +6138,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
6138 | DelinkObjects handlerDelinkObjects = OnDelinkObjects; | 6138 | DelinkObjects handlerDelinkObjects = OnDelinkObjects; |
6139 | if (handlerDelinkObjects != null) | 6139 | if (handlerDelinkObjects != null) |
6140 | { | 6140 | { |
6141 | handlerDelinkObjects(prims); | 6141 | handlerDelinkObjects(prims, this); |
6142 | } | 6142 | } |
6143 | 6143 | ||
6144 | return true; | 6144 | return true; |
diff --git a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs index 01359f0..b0bb810 100644 --- a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs +++ b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs | |||
@@ -1721,7 +1721,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
1721 | DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); | 1721 | DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); |
1722 | if (m_bypassPermissions) return m_bypassPermissionsValue; | 1722 | if (m_bypassPermissions) return m_bypassPermissionsValue; |
1723 | 1723 | ||
1724 | return true; | 1724 | return GenericObjectPermission(editorID, objectID, false); |
1725 | } | 1725 | } |
1726 | 1726 | ||
1727 | private bool CanDelinkObject(UUID userID, UUID objectID) | 1727 | private bool CanDelinkObject(UUID userID, UUID objectID) |
@@ -1729,7 +1729,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
1729 | DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); | 1729 | DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); |
1730 | if (m_bypassPermissions) return m_bypassPermissionsValue; | 1730 | if (m_bypassPermissions) return m_bypassPermissionsValue; |
1731 | 1731 | ||
1732 | return true; | 1732 | return GenericObjectPermission(editorID, objectID, false); |
1733 | } | 1733 | } |
1734 | 1734 | ||
1735 | private bool CanBuyLand(UUID userID, ILandObject parcel, Scene scene) | 1735 | private bool CanBuyLand(UUID userID, ILandObject parcel, Scene scene) |
diff --git a/OpenSim/Region/DataSnapshot/ObjectSnapshot.cs b/OpenSim/Region/DataSnapshot/ObjectSnapshot.cs index f441aa9..6e69902 100644 --- a/OpenSim/Region/DataSnapshot/ObjectSnapshot.cs +++ b/OpenSim/Region/DataSnapshot/ObjectSnapshot.cs | |||
@@ -69,7 +69,7 @@ namespace OpenSim.Region.DataSnapshot.Providers | |||
69 | byte RayEndIsIntersection) { this.Stale = true; }; | 69 | byte RayEndIsIntersection) { this.Stale = true; }; |
70 | client.OnLinkObjects += delegate (IClientAPI remoteClient, uint parent, List<uint> children) | 70 | client.OnLinkObjects += delegate (IClientAPI remoteClient, uint parent, List<uint> children) |
71 | { this.Stale = true; }; | 71 | { this.Stale = true; }; |
72 | client.OnDelinkObjects += delegate(List<uint> primIds) { this.Stale = true; }; | 72 | client.OnDelinkObjects += delegate(List<uint> primIds, IClientAPI clientApi) { this.Stale = true; }; |
73 | client.OnGrabUpdate += delegate(UUID objectID, Vector3 offset, Vector3 grapPos, | 73 | client.OnGrabUpdate += delegate(UUID objectID, Vector3 offset, Vector3 grapPos, |
74 | IClientAPI remoteClient, List<SurfaceTouchEventArgs> surfaceArgs) { this.Stale = true; }; | 74 | IClientAPI remoteClient, List<SurfaceTouchEventArgs> surfaceArgs) { this.Stale = true; }; |
75 | client.OnObjectAttach += delegate(IClientAPI remoteClient, uint objectLocalID, uint AttachmentPt, | 75 | client.OnObjectAttach += delegate(IClientAPI remoteClient, uint objectLocalID, uint AttachmentPt, |
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index e6e414f..90bce39 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | |||
@@ -1944,5 +1944,55 @@ namespace OpenSim.Region.Framework.Scenes | |||
1944 | part.GetProperties(remoteClient); | 1944 | part.GetProperties(remoteClient); |
1945 | } | 1945 | } |
1946 | } | 1946 | } |
1947 | |||
1948 | public void DelinkObjects(List<uint> primIds, IClientAPI client) | ||
1949 | { | ||
1950 | List<SceneObjectPart> parts = new List<SceneObjectPart>(); | ||
1951 | |||
1952 | foreach (uint localID in primIds) | ||
1953 | { | ||
1954 | SceneObjectPart part = GetSceneObjectPart(localID); | ||
1955 | |||
1956 | if (part == null) | ||
1957 | continue; | ||
1958 | |||
1959 | if (Permissions.CanDelinkObject(client.AgentId, part.ParentGroup.RootPart.UUID)) | ||
1960 | parts.Add(part); | ||
1961 | } | ||
1962 | |||
1963 | m_sceneGraph.DelinkObjects(parts); | ||
1964 | } | ||
1965 | |||
1966 | public void LinkObjects(IClientAPI client, uint parentPrimId, List<uint> childPrimIds) | ||
1967 | { | ||
1968 | List<UUID> owners = new List<UUID>(); | ||
1969 | |||
1970 | List<SceneObjectPart> children = new List<SceneObjectPart>(); | ||
1971 | SceneObjectPart root = GetSceneObjectPart(parentPrimId); | ||
1972 | |||
1973 | if (Permissions.CanLinkObject(client.AgentId, root.ParentGroup.RootPart.UUID)) | ||
1974 | return; | ||
1975 | |||
1976 | foreach (uint localID in childPrimIds) | ||
1977 | { | ||
1978 | SceneObjectPart part = GetSceneObjectPart(localID); | ||
1979 | |||
1980 | if (part == null) | ||
1981 | continue; | ||
1982 | |||
1983 | if (!owners.Contains(part.OwnerID)) | ||
1984 | owners.Add(part.OwnerID); | ||
1985 | |||
1986 | if (Permissions.CanLinkObject(client.AgentId, part.ParentGroup.RootPart.UUID)) | ||
1987 | children.Add(part); | ||
1988 | } | ||
1989 | |||
1990 | // Must be all one owner | ||
1991 | // | ||
1992 | if (owners.Count > 1) | ||
1993 | return; | ||
1994 | |||
1995 | m_sceneGraph.LinkObjects(root, children); | ||
1996 | } | ||
1947 | } | 1997 | } |
1948 | } | 1998 | } |
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 58f890f..8ceb109 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -2749,8 +2749,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
2749 | client.OnObjectName += m_sceneGraph.PrimName; | 2749 | client.OnObjectName += m_sceneGraph.PrimName; |
2750 | client.OnObjectClickAction += m_sceneGraph.PrimClickAction; | 2750 | client.OnObjectClickAction += m_sceneGraph.PrimClickAction; |
2751 | client.OnObjectMaterial += m_sceneGraph.PrimMaterial; | 2751 | client.OnObjectMaterial += m_sceneGraph.PrimMaterial; |
2752 | client.OnLinkObjects += m_sceneGraph.LinkObjects; | 2752 | client.OnLinkObjects += LinkObjects; |
2753 | client.OnDelinkObjects += m_sceneGraph.DelinkObjects; | 2753 | client.OnDelinkObjects += DelinkObjects; |
2754 | client.OnObjectDuplicate += m_sceneGraph.DuplicateObject; | 2754 | client.OnObjectDuplicate += m_sceneGraph.DuplicateObject; |
2755 | client.OnObjectDuplicateOnRay += doObjectDuplicateOnRay; | 2755 | client.OnObjectDuplicateOnRay += doObjectDuplicateOnRay; |
2756 | client.OnUpdatePrimFlags += m_sceneGraph.UpdatePrimFlags; | 2756 | client.OnUpdatePrimFlags += m_sceneGraph.UpdatePrimFlags; |
@@ -2906,8 +2906,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
2906 | client.OnObjectName -= m_sceneGraph.PrimName; | 2906 | client.OnObjectName -= m_sceneGraph.PrimName; |
2907 | client.OnObjectClickAction -= m_sceneGraph.PrimClickAction; | 2907 | client.OnObjectClickAction -= m_sceneGraph.PrimClickAction; |
2908 | client.OnObjectMaterial -= m_sceneGraph.PrimMaterial; | 2908 | client.OnObjectMaterial -= m_sceneGraph.PrimMaterial; |
2909 | client.OnLinkObjects -= m_sceneGraph.LinkObjects; | 2909 | client.OnLinkObjects -= LinkObjects; |
2910 | client.OnDelinkObjects -= m_sceneGraph.DelinkObjects; | 2910 | client.OnDelinkObjects -= DelinkObjects; |
2911 | client.OnObjectDuplicate -= m_sceneGraph.DuplicateObject; | 2911 | client.OnObjectDuplicate -= m_sceneGraph.DuplicateObject; |
2912 | client.OnObjectDuplicateOnRay -= doObjectDuplicateOnRay; | 2912 | client.OnObjectDuplicateOnRay -= doObjectDuplicateOnRay; |
2913 | client.OnUpdatePrimFlags -= m_sceneGraph.UpdatePrimFlags; | 2913 | client.OnUpdatePrimFlags -= m_sceneGraph.UpdatePrimFlags; |
diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs index 3ac34d3..f43de20 100644 --- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs +++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs | |||
@@ -1487,20 +1487,21 @@ namespace OpenSim.Region.Framework.Scenes | |||
1487 | /// <param name="client"></param> | 1487 | /// <param name="client"></param> |
1488 | /// <param name="parentPrim"></param> | 1488 | /// <param name="parentPrim"></param> |
1489 | /// <param name="childPrims"></param> | 1489 | /// <param name="childPrims"></param> |
1490 | protected internal void LinkObjects(IClientAPI client, uint parentPrimId, List<uint> childPrimIds) | 1490 | protected internal void LinkObjects(SceneObjectPart root, List<SceneObjectPart> children) |
1491 | { | 1491 | { |
1492 | Monitor.Enter(m_updateLock); | 1492 | Monitor.Enter(m_updateLock); |
1493 | try | 1493 | try |
1494 | { | 1494 | { |
1495 | SceneObjectGroup parentGroup = GetGroupByPrim(parentPrimId); | 1495 | SceneObjectGroup parentGroup = root.ParentGroup; |
1496 | 1496 | ||
1497 | List<SceneObjectGroup> childGroups = new List<SceneObjectGroup>(); | 1497 | List<SceneObjectGroup> childGroups = new List<SceneObjectGroup>(); |
1498 | if (parentGroup != null) | 1498 | if (parentGroup != null) |
1499 | { | 1499 | { |
1500 | // We do this in reverse to get the link order of the prims correct | 1500 | // We do this in reverse to get the link order of the prims correct |
1501 | for (int i = childPrimIds.Count - 1; i >= 0; i--) | 1501 | for (int i = children.Count - 1; i >= 0; i--) |
1502 | { | 1502 | { |
1503 | SceneObjectGroup child = GetGroupByPrim(childPrimIds[i]); | 1503 | SceneObjectGroup child = children[i].ParentGroup; |
1504 | |||
1504 | if (child != null) | 1505 | if (child != null) |
1505 | { | 1506 | { |
1506 | // Make sure no child prim is set for sale | 1507 | // Make sure no child prim is set for sale |
@@ -1533,17 +1534,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
1533 | parentGroup.HasGroupChanged = true; | 1534 | parentGroup.HasGroupChanged = true; |
1534 | parentGroup.ScheduleGroupForFullUpdate(); | 1535 | parentGroup.ScheduleGroupForFullUpdate(); |
1535 | 1536 | ||
1536 | // if (client != null) | ||
1537 | // { | ||
1538 | // parentGroup.GetProperties(client); | ||
1539 | // } | ||
1540 | // else | ||
1541 | // { | ||
1542 | // foreach (ScenePresence p in GetScenePresences()) | ||
1543 | // { | ||
1544 | // parentGroup.GetProperties(p.ControllingClient); | ||
1545 | // } | ||
1546 | // } | ||
1547 | } | 1537 | } |
1548 | finally | 1538 | finally |
1549 | { | 1539 | { |
@@ -1555,12 +1545,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1555 | /// Delink a linkset | 1545 | /// Delink a linkset |
1556 | /// </summary> | 1546 | /// </summary> |
1557 | /// <param name="prims"></param> | 1547 | /// <param name="prims"></param> |
1558 | protected internal void DelinkObjects(List<uint> primIds) | 1548 | protected internal void DelinkObjects(List<SceneObjectPart> prims) |
1559 | { | ||
1560 | DelinkObjects(primIds, true); | ||
1561 | } | ||
1562 | |||
1563 | protected internal void DelinkObjects(List<uint> primIds, bool sendEvents) | ||
1564 | { | 1549 | { |
1565 | Monitor.Enter(m_updateLock); | 1550 | Monitor.Enter(m_updateLock); |
1566 | try | 1551 | try |
@@ -1570,9 +1555,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
1570 | List<SceneObjectGroup> affectedGroups = new List<SceneObjectGroup>(); | 1555 | List<SceneObjectGroup> affectedGroups = new List<SceneObjectGroup>(); |
1571 | // Look them all up in one go, since that is comparatively expensive | 1556 | // Look them all up in one go, since that is comparatively expensive |
1572 | // | 1557 | // |
1573 | foreach (uint primID in primIds) | 1558 | foreach (SceneObjectPart part in prims) |
1574 | { | 1559 | { |
1575 | SceneObjectPart part = m_parentScene.GetSceneObjectPart(primID); | ||
1576 | if (part != null) | 1560 | if (part != null) |
1577 | { | 1561 | { |
1578 | if (part.ParentGroup.Children.Count != 1) // Skip single | 1562 | if (part.ParentGroup.Children.Count != 1) // Skip single |
@@ -1587,17 +1571,13 @@ namespace OpenSim.Region.Framework.Scenes | |||
1587 | affectedGroups.Add(group); | 1571 | affectedGroups.Add(group); |
1588 | } | 1572 | } |
1589 | } | 1573 | } |
1590 | else | ||
1591 | { | ||
1592 | m_log.ErrorFormat("Viewer requested unlink of nonexistent part {0}", primID); | ||
1593 | } | ||
1594 | } | 1574 | } |
1595 | 1575 | ||
1596 | foreach (SceneObjectPart child in childParts) | 1576 | foreach (SceneObjectPart child in childParts) |
1597 | { | 1577 | { |
1598 | // Unlink all child parts from their groups | 1578 | // Unlink all child parts from their groups |
1599 | // | 1579 | // |
1600 | child.ParentGroup.DelinkFromGroup(child, sendEvents); | 1580 | child.ParentGroup.DelinkFromGroup(child, true); |
1601 | } | 1581 | } |
1602 | 1582 | ||
1603 | foreach (SceneObjectPart root in rootParts) | 1583 | foreach (SceneObjectPart root in rootParts) |
@@ -1652,12 +1632,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
1652 | List<uint> linkIDs = new List<uint>(); | 1632 | List<uint> linkIDs = new List<uint>(); |
1653 | 1633 | ||
1654 | foreach (SceneObjectPart newChild in newSet) | 1634 | foreach (SceneObjectPart newChild in newSet) |
1655 | { | ||
1656 | newChild.UpdateFlag = 0; | 1635 | newChild.UpdateFlag = 0; |
1657 | linkIDs.Add(newChild.LocalId); | ||
1658 | } | ||
1659 | 1636 | ||
1660 | LinkObjects(null, newRoot.LocalId, linkIDs); | 1637 | LinkObjects(newRoot, newSet); |
1661 | if (!affectedGroups.Contains(newRoot.ParentGroup)) | 1638 | if (!affectedGroups.Contains(newRoot.ParentGroup)) |
1662 | affectedGroups.Add(newRoot.ParentGroup); | 1639 | affectedGroups.Add(newRoot.ParentGroup); |
1663 | } | 1640 | } |