diff options
author | Justin Clark-Casey (justincc) | 2010-05-03 21:36:04 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2010-05-03 21:36:04 +0100 |
commit | 087f47589383ab63760c143f4e7ab3dbe043b325 (patch) | |
tree | da0a61bb03b5444610075e1c1102c3fee72b5313 /OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | |
parent | Address symptom of Mantis 4588 (though not the cause) by moving the avatar de... (diff) | |
parent | Fix some symbol errors (diff) | |
download | opensim-SC_OLD-087f47589383ab63760c143f4e7ab3dbe043b325.zip opensim-SC_OLD-087f47589383ab63760c143f4e7ab3dbe043b325.tar.gz opensim-SC_OLD-087f47589383ab63760c143f4e7ab3dbe043b325.tar.bz2 opensim-SC_OLD-087f47589383ab63760c143f4e7ab3dbe043b325.tar.xz |
Merge branch '0.6.9-post-fixes' into 0.6.9
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Scene.Inventory.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index 5b21332..8716e0a 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | |||
@@ -2568,5 +2568,55 @@ namespace OpenSim.Region.Framework.Scenes | |||
2568 | part.GetProperties(remoteClient); | 2568 | part.GetProperties(remoteClient); |
2569 | } | 2569 | } |
2570 | } | 2570 | } |
2571 | |||
2572 | public void DelinkObjects(List<uint> primIds, IClientAPI client) | ||
2573 | { | ||
2574 | List<SceneObjectPart> parts = new List<SceneObjectPart>(); | ||
2575 | |||
2576 | foreach (uint localID in primIds) | ||
2577 | { | ||
2578 | SceneObjectPart part = GetSceneObjectPart(localID); | ||
2579 | |||
2580 | if (part == null) | ||
2581 | continue; | ||
2582 | |||
2583 | if (Permissions.CanDelinkObject(client.AgentId, part.ParentGroup.RootPart.UUID)) | ||
2584 | parts.Add(part); | ||
2585 | } | ||
2586 | |||
2587 | m_sceneGraph.DelinkObjects(parts); | ||
2588 | } | ||
2589 | |||
2590 | public void LinkObjects(IClientAPI client, uint parentPrimId, List<uint> childPrimIds) | ||
2591 | { | ||
2592 | List<UUID> owners = new List<UUID>(); | ||
2593 | |||
2594 | List<SceneObjectPart> children = new List<SceneObjectPart>(); | ||
2595 | SceneObjectPart root = GetSceneObjectPart(parentPrimId); | ||
2596 | |||
2597 | if (Permissions.CanLinkObject(client.AgentId, root.ParentGroup.RootPart.UUID)) | ||
2598 | return; | ||
2599 | |||
2600 | foreach (uint localID in childPrimIds) | ||
2601 | { | ||
2602 | SceneObjectPart part = GetSceneObjectPart(localID); | ||
2603 | |||
2604 | if (part == null) | ||
2605 | continue; | ||
2606 | |||
2607 | if (!owners.Contains(part.OwnerID)) | ||
2608 | owners.Add(part.OwnerID); | ||
2609 | |||
2610 | if (Permissions.CanLinkObject(client.AgentId, part.ParentGroup.RootPart.UUID)) | ||
2611 | children.Add(part); | ||
2612 | } | ||
2613 | |||
2614 | // Must be all one owner | ||
2615 | // | ||
2616 | if (owners.Count > 1) | ||
2617 | return; | ||
2618 | |||
2619 | m_sceneGraph.LinkObjects(root, children); | ||
2620 | } | ||
2571 | } | 2621 | } |
2572 | } | 2622 | } |