aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.Inventory.cs21
1 files changed, 13 insertions, 8 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
index dbc7def..2f016fa 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
@@ -2085,7 +2085,7 @@ namespace OpenSim.Region.Framework.Scenes
2085 /// <param name='action'>DeRezAction</param> 2085 /// <param name='action'>DeRezAction</param>
2086 /// <param name='destinationID'>User folder ID to place derezzed object</param> 2086 /// <param name='destinationID'>User folder ID to place derezzed object</param>
2087 public virtual void DeRezObjects( 2087 public virtual void DeRezObjects(
2088 IClientAPI remoteClient, List<uint> localIDs, UUID groupID, DeRezAction action, UUID destinationID) 2088 IClientAPI remoteClient, List<uint> localIDs, UUID groupID, DeRezAction action, UUID destinationID, bool AddToReturns = true)
2089 { 2089 {
2090 // First, see of we can perform the requested action and 2090 // First, see of we can perform the requested action and
2091 // build a list of eligible objects 2091 // build a list of eligible objects
@@ -2094,7 +2094,11 @@ namespace OpenSim.Region.Framework.Scenes
2094 List<SceneObjectGroup> takeGroups = new List<SceneObjectGroup>(); 2094 List<SceneObjectGroup> takeGroups = new List<SceneObjectGroup>();
2095 List<SceneObjectGroup> takeDeleteGroups = new List<SceneObjectGroup>(); 2095 List<SceneObjectGroup> takeDeleteGroups = new List<SceneObjectGroup>();
2096 2096
2097 ScenePresence sp = remoteClient.SceneAgent as ScenePresence; 2097 ScenePresence sp = null;
2098 if(remoteClient != null)
2099 sp = remoteClient.SceneAgent as ScenePresence;
2100 else if(action != DeRezAction.Return)
2101 return; // only Return can be called without a client
2098 2102
2099 // Start with true for both, then remove the flags if objects 2103 // Start with true for both, then remove the flags if objects
2100 // that we can't derez are part of the selection 2104 // that we can't derez are part of the selection
@@ -2201,13 +2205,14 @@ namespace OpenSim.Region.Framework.Scenes
2201 { 2205 {
2202 if (Permissions.CanReturnObjects( 2206 if (Permissions.CanReturnObjects(
2203 null, 2207 null,
2204 remoteClient.AgentId, 2208 remoteClient,
2205 new List<SceneObjectGroup>() {grp})) 2209 new List<SceneObjectGroup>() {grp}))
2206 { 2210 {
2207 permissionToTake = true; 2211 permissionToTake = true;
2208 permissionToDelete = true; 2212 permissionToDelete = true;
2209 2213 if(AddToReturns)
2210 AddReturn(grp.OwnerID == grp.GroupID ? grp.LastOwnerID : grp.OwnerID, grp.Name, grp.AbsolutePosition, "parcel owner return"); 2214 AddReturn(grp.OwnerID == grp.GroupID ? grp.LastOwnerID : grp.OwnerID, grp.Name, grp.AbsolutePosition,
2215 "parcel owner return");
2211 } 2216 }
2212 } 2217 }
2213 else // Auto return passes through here with null agent 2218 else // Auto return passes through here with null agent
@@ -2641,7 +2646,7 @@ namespace OpenSim.Region.Framework.Scenes
2641 } 2646 }
2642 2647
2643 public virtual bool returnObjects(SceneObjectGroup[] returnobjects, 2648 public virtual bool returnObjects(SceneObjectGroup[] returnobjects,
2644 UUID AgentId) 2649 IClientAPI client)
2645 { 2650 {
2646 List<uint> localIDs = new List<uint>(); 2651 List<uint> localIDs = new List<uint>();
2647 2652
@@ -2651,8 +2656,8 @@ namespace OpenSim.Region.Framework.Scenes
2651 "parcel owner return"); 2656 "parcel owner return");
2652 localIDs.Add(grp.RootPart.LocalId); 2657 localIDs.Add(grp.RootPart.LocalId);
2653 } 2658 }
2654 DeRezObjects(null, localIDs, UUID.Zero, DeRezAction.Return, 2659 DeRezObjects(client, localIDs, UUID.Zero, DeRezAction.Return,
2655 UUID.Zero); 2660 UUID.Zero, false);
2656 2661
2657 return true; 2662 return true;
2658 } 2663 }