aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/OptionalModules/World
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/OptionalModules/World')
-rw-r--r--OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs10
1 files changed, 3 insertions, 7 deletions
diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs
index 79c79e4..e58dca2 100644
--- a/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs
+++ b/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs
@@ -144,14 +144,10 @@ namespace OpenSim.Region.OptionalModules.World.NPC
144 return false; 144 return false;
145 145
146 // FIXME: An extremely bad bit of code that reaches directly into the attachments list and manipulates it 146 // FIXME: An extremely bad bit of code that reaches directly into the attachments list and manipulates it
147 List<SceneObjectGroup> attachments = sp.Attachments; 147 foreach (SceneObjectGroup att in sp.GetAttachments())
148 lock (attachments) 148 scene.DeleteSceneObject(att, false);
149 {
150 foreach (SceneObjectGroup att in attachments)
151 scene.DeleteSceneObject(att, false);
152 149
153 attachments.Clear(); 150 sp.ClearAttachments();
154 }
155 151
156 AvatarAppearance npcAppearance = new AvatarAppearance(appearance, true); 152 AvatarAppearance npcAppearance = new AvatarAppearance(appearance, true);
157 sp.Appearance = npcAppearance; 153 sp.Appearance = npcAppearance;