mirror of
https://github.com/opensim/opensim.git
synced 2026-08-10 03:06:05 +08:00
move common code into AttachmentsModule.DeleteAttachmentsFromScene()
This commit is contained in:
@@ -47,6 +47,15 @@ namespace OpenSim.Region.Framework.Interfaces
|
||||
/// <param name="sp"></param>
|
||||
void SaveChangedAttachments(IScenePresence sp);
|
||||
|
||||
/// <summary>
|
||||
/// Delete all the presence's attachments from the scene
|
||||
/// </summary>
|
||||
/// <param name="sp">
|
||||
/// This is done when a root agent leaves/is demoted to child (for instance, on logout, teleport or region cross).
|
||||
/// </param>
|
||||
/// <param name="silent"></param>
|
||||
void DeleteAttachmentsFromScene(IScenePresence sp, bool silent);
|
||||
|
||||
/// <summary>
|
||||
/// Attach an object to an avatar from the world.
|
||||
/// </summary>
|
||||
|
||||
@@ -62,9 +62,22 @@ namespace OpenSim.Region.Framework.Interfaces
|
||||
/// A copy of the list.
|
||||
/// </returns>
|
||||
/// <remarks>
|
||||
/// Do not change this list directly - use methods such as
|
||||
/// AddAttachment() and RemoveAttachment().
|
||||
/// Do not change this list directly - use the attachments module.
|
||||
/// </remarks>
|
||||
List<SceneObjectGroup> GetAttachments();
|
||||
|
||||
/// <summary>
|
||||
/// The scene objects attached to this avatar at a specific attachment point.
|
||||
/// </summary>
|
||||
/// <param name="attachmentPoint"></param>
|
||||
/// <returns></returns>
|
||||
List<SceneObjectGroup> GetAttachments(uint attachmentPoint);
|
||||
|
||||
bool HasAttachments();
|
||||
|
||||
// Don't use these methods directly. Instead, use the AttachmentsModule
|
||||
void AddAttachment(SceneObjectGroup gobj);
|
||||
void RemoveAttachment(SceneObjectGroup gobj);
|
||||
void ClearAttachments();
|
||||
}
|
||||
}
|
||||
@@ -3401,19 +3401,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
|
||||
public void Close()
|
||||
{
|
||||
lock (m_attachments)
|
||||
{
|
||||
// Delete attachments from scene
|
||||
// Don't try to save, as this thread won't live long
|
||||
// enough to complete the save. This would cause no copy
|
||||
// attachments to poof!
|
||||
//
|
||||
foreach (SceneObjectGroup grp in m_attachments)
|
||||
{
|
||||
m_scene.DeleteSceneObject(grp, false);
|
||||
}
|
||||
m_attachments.Clear();
|
||||
}
|
||||
m_scene.AttachmentsModule.DeleteAttachmentsFromScene(this, false);
|
||||
|
||||
lock (m_knownChildRegions)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user