diff options
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/AsyncSceneObjectGroupDeleter.cs')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/AsyncSceneObjectGroupDeleter.cs | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/OpenSim/Region/Environment/Scenes/AsyncSceneObjectGroupDeleter.cs b/OpenSim/Region/Environment/Scenes/AsyncSceneObjectGroupDeleter.cs index 44c5a13..19ba5fa 100644 --- a/OpenSim/Region/Environment/Scenes/AsyncSceneObjectGroupDeleter.cs +++ b/OpenSim/Region/Environment/Scenes/AsyncSceneObjectGroupDeleter.cs | |||
@@ -42,6 +42,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
42 | public IClientAPI remoteClient; | 42 | public IClientAPI remoteClient; |
43 | public SceneObjectGroup objectGroup; | 43 | public SceneObjectGroup objectGroup; |
44 | public UUID folderID; | 44 | public UUID folderID; |
45 | public bool permissionToDelete; | ||
45 | } | 46 | } |
46 | 47 | ||
47 | /// <summary> | 48 | /// <summary> |
@@ -87,6 +88,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
87 | dtis.folderID = folderID; | 88 | dtis.folderID = folderID; |
88 | dtis.objectGroup = objectGroup; | 89 | dtis.objectGroup = objectGroup; |
89 | dtis.remoteClient = remoteClient; | 90 | dtis.remoteClient = remoteClient; |
91 | dtis.permissionToDelete = permissionToDelete; | ||
90 | 92 | ||
91 | m_inventoryDeletes.Enqueue(dtis); | 93 | m_inventoryDeletes.Enqueue(dtis); |
92 | } | 94 | } |
@@ -94,8 +96,12 @@ namespace OpenSim.Region.Environment.Scenes | |||
94 | if (Enabled) | 96 | if (Enabled) |
95 | m_inventoryTicker.Start(); | 97 | m_inventoryTicker.Start(); |
96 | 98 | ||
99 | // Visually remove it, even if it isnt really gone yet. This means that if we crash before the object | ||
100 | // has gone to inventory, it will reappear in the region again on restart instead of being lost. | ||
101 | // This is not ideal since the object will still be available for manipulation when it should be, but it's | ||
102 | // better than losing the object for now. | ||
97 | if (permissionToDelete) | 103 | if (permissionToDelete) |
98 | m_scene.DeleteSceneObject(objectGroup, false); | 104 | objectGroup.DeleteGroup(false); |
99 | } | 105 | } |
100 | 106 | ||
101 | private void InventoryRunDeleteTimer(object sender, ElapsedEventArgs e) | 107 | private void InventoryRunDeleteTimer(object sender, ElapsedEventArgs e) |
@@ -126,7 +132,9 @@ namespace OpenSim.Region.Environment.Scenes | |||
126 | 132 | ||
127 | try | 133 | try |
128 | { | 134 | { |
129 | m_scene.DeleteToInventory(x.destination, x.folderID, x.objectGroup, x.remoteClient); | 135 | m_scene.DeleteToInventory(x.destination, x.folderID, x.objectGroup, x.remoteClient); |
136 | if (x.permissionToDelete) | ||
137 | m_scene.DeleteSceneObject(x.objectGroup, false); | ||
130 | } | 138 | } |
131 | catch (Exception e) | 139 | catch (Exception e) |
132 | { | 140 | { |