move common code into AttachmentsModule.DeleteAttachmentsFromScene()

This commit is contained in:
Justin Clark-Casey (justincc)
2011-08-31 17:53:58 +01:00
parent 3aa86d22d1
commit 7d58b5fa15
6 changed files with 37 additions and 25 deletions

View File

@@ -143,11 +143,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC
if (!m_avatars.ContainsKey(agentId))
return false;
// FIXME: An extremely bad bit of code that reaches directly into the attachments list and manipulates it
foreach (SceneObjectGroup att in sp.GetAttachments())
scene.DeleteSceneObject(att, false);
sp.ClearAttachments();
scene.AttachmentsModule.DeleteAttachmentsFromScene(sp, false);
AvatarAppearance npcAppearance = new AvatarAppearance(appearance, true);
sp.Appearance = npcAppearance;