aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs32
1 files changed, 32 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 957c4e8..d0619d7 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -5040,5 +5040,37 @@ namespace OpenSim.Region.Framework.Scenes
5040 throw new Exception(error); 5040 throw new Exception(error);
5041 } 5041 }
5042 } 5042 }
5043
5044 public void CleanDroppedAttachments()
5045 {
5046 List<SceneObjectGroup> objectsToDelete =
5047 new List<SceneObjectGroup>();
5048
5049 ForEachSOG(delegate (SceneObjectGroup grp)
5050 {
5051 if (grp.RootPart.Shape.State != 0)
5052 {
5053 UUID agentID = grp.OwnerID;
5054 if (agentID == UUID.Zero)
5055 {
5056 objectsToDelete.Add(grp);
5057 return;
5058 }
5059
5060 ScenePresence sp = GetScenePresence(agentID);
5061 if (sp == null)
5062 {
5063 objectsToDelete.Add(grp);
5064 return;
5065 }
5066 }
5067 });
5068
5069 foreach (SceneObjectGroup grp in objectsToDelete)
5070 {
5071 m_log.InfoFormat("[SCENE]: Deleting dropped attachment {0} of user {1}", grp.UUID, grp.OwnerID);
5072 DeleteSceneObject(grp, true);
5073 }
5074 }
5043 } 5075 }
5044} 5076}