aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/AsyncSceneObjectGroupDeleter.cs
diff options
context:
space:
mode:
authorMelanie Thielker2010-06-01 02:27:30 +0200
committerMelanie2010-06-01 02:10:22 +0100
commitf29cb57bf183c0530ead35890163f39903c8f410 (patch)
tree303f04127a4051be5d27c2007edc359e1e306478 /OpenSim/Region/Framework/Scenes/AsyncSceneObjectGroupDeleter.cs
parentAdd a method to get the bounding box and root prim offsets within it for (diff)
downloadopensim-SC_OLD-f29cb57bf183c0530ead35890163f39903c8f410.zip
opensim-SC_OLD-f29cb57bf183c0530ead35890163f39903c8f410.tar.gz
opensim-SC_OLD-f29cb57bf183c0530ead35890163f39903c8f410.tar.bz2
opensim-SC_OLD-f29cb57bf183c0530ead35890163f39903c8f410.tar.xz
Continuing refactor. Refactor DeRezObject to deal with multiple objects
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Framework/Scenes/AsyncSceneObjectGroupDeleter.cs18
1 files changed, 12 insertions, 6 deletions
diff --git a/OpenSim/Region/Framework/Scenes/AsyncSceneObjectGroupDeleter.cs b/OpenSim/Region/Framework/Scenes/AsyncSceneObjectGroupDeleter.cs
index c08b961..241cac0 100644
--- a/OpenSim/Region/Framework/Scenes/AsyncSceneObjectGroupDeleter.cs
+++ b/OpenSim/Region/Framework/Scenes/AsyncSceneObjectGroupDeleter.cs
@@ -40,7 +40,7 @@ namespace OpenSim.Region.Framework.Scenes
40 { 40 {
41 public DeRezAction action; 41 public DeRezAction action;
42 public IClientAPI remoteClient; 42 public IClientAPI remoteClient;
43 public SceneObjectGroup objectGroup; 43 public List<SceneObjectGroup> objectGroups;
44 public UUID folderID; 44 public UUID folderID;
45 public bool permissionToDelete; 45 public bool permissionToDelete;
46 } 46 }
@@ -75,7 +75,7 @@ namespace OpenSim.Region.Framework.Scenes
75 /// Delete the given object from the scene 75 /// Delete the given object from the scene
76 /// </summary> 76 /// </summary>
77 public void DeleteToInventory(DeRezAction action, UUID folderID, 77 public void DeleteToInventory(DeRezAction action, UUID folderID,
78 SceneObjectGroup objectGroup, IClientAPI remoteClient, 78 List<SceneObjectGroup> objectGroups, IClientAPI remoteClient,
79 bool permissionToDelete) 79 bool permissionToDelete)
80 { 80 {
81 if (Enabled) 81 if (Enabled)
@@ -87,7 +87,7 @@ namespace OpenSim.Region.Framework.Scenes
87 DeleteToInventoryHolder dtis = new DeleteToInventoryHolder(); 87 DeleteToInventoryHolder dtis = new DeleteToInventoryHolder();
88 dtis.action = action; 88 dtis.action = action;
89 dtis.folderID = folderID; 89 dtis.folderID = folderID;
90 dtis.objectGroup = objectGroup; 90 dtis.objectGroups = objectGroups;
91 dtis.remoteClient = remoteClient; 91 dtis.remoteClient = remoteClient;
92 dtis.permissionToDelete = permissionToDelete; 92 dtis.permissionToDelete = permissionToDelete;
93 93
@@ -103,7 +103,10 @@ namespace OpenSim.Region.Framework.Scenes
103 // This is not ideal since the object will still be available for manipulation when it should be, but it's 103 // This is not ideal since the object will still be available for manipulation when it should be, but it's
104 // better than losing the object for now. 104 // better than losing the object for now.
105 if (permissionToDelete) 105 if (permissionToDelete)
106 objectGroup.DeleteGroup(false); 106 {
107 foreach (SceneObjectGroup g in objectGroups)
108 g.DeleteGroup(false);
109 }
107 } 110 }
108 111
109 private void InventoryRunDeleteTimer(object sender, ElapsedEventArgs e) 112 private void InventoryRunDeleteTimer(object sender, ElapsedEventArgs e)
@@ -140,9 +143,12 @@ namespace OpenSim.Region.Framework.Scenes
140 { 143 {
141 IInventoryAccessModule invAccess = m_scene.RequestModuleInterface<IInventoryAccessModule>(); 144 IInventoryAccessModule invAccess = m_scene.RequestModuleInterface<IInventoryAccessModule>();
142 if (invAccess != null) 145 if (invAccess != null)
143 invAccess.DeleteToInventory(x.action, x.folderID, x.objectGroup, x.remoteClient); 146 invAccess.DeleteToInventory(x.action, x.folderID, x.objectGroups, x.remoteClient);
144 if (x.permissionToDelete) 147 if (x.permissionToDelete)
145 m_scene.DeleteSceneObject(x.objectGroup, false); 148 {
149 foreach (SceneObjectGroup g in x.objectGroups)
150 m_scene.DeleteSceneObject(g, false);
151 }
146 } 152 }
147 catch (Exception e) 153 catch (Exception e)
148 { 154 {