aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/OptionalModules/World/NPC
diff options
context:
space:
mode:
authorDan Lake2012-02-14 17:20:34 -0800
committerDan Lake2012-02-14 17:20:34 -0800
commit2ebb421331c4e6c4f57e0cc1bab79cea70937172 (patch)
tree605942c8ef6c594667067b77458ecd205e6006f7 /OpenSim/Region/OptionalModules/World/NPC
parentFix a race condition in the simian groups connector. When requests were (diff)
downloadopensim-SC_OLD-2ebb421331c4e6c4f57e0cc1bab79cea70937172.zip
opensim-SC_OLD-2ebb421331c4e6c4f57e0cc1bab79cea70937172.tar.gz
opensim-SC_OLD-2ebb421331c4e6c4f57e0cc1bab79cea70937172.tar.bz2
opensim-SC_OLD-2ebb421331c4e6c4f57e0cc1bab79cea70937172.tar.xz
Refactor appearance saving for NPC to use AvatarFactoryModule interface.
Diffstat (limited to 'OpenSim/Region/OptionalModules/World/NPC')
-rw-r--r--OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs12
1 files changed, 6 insertions, 6 deletions
diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs
index dc6eefc..5359354 100644
--- a/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs
+++ b/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs
@@ -96,15 +96,15 @@ namespace OpenSim.Region.OptionalModules.World.NPC
96 if (!m_avatars.ContainsKey(agentId)) 96 if (!m_avatars.ContainsKey(agentId))
97 return false; 97 return false;
98 98
99 // Delete existing sp attachments
99 scene.AttachmentsModule.DeleteAttachmentsFromScene(sp, false); 100 scene.AttachmentsModule.DeleteAttachmentsFromScene(sp, false);
100 101
101 AvatarAppearance npcAppearance = new AvatarAppearance(appearance, true); 102 // Set new sp appearance. Also sends to clients.
102 sp.Appearance = npcAppearance; 103 scene.RequestModuleInterface<IAvatarFactoryModule>().SetAppearance(sp, new AvatarAppearance(appearance, true));
104
105 // Rez needed sp attachments
103 scene.AttachmentsModule.RezAttachments(sp); 106 scene.AttachmentsModule.RezAttachments(sp);
104 107
105 IAvatarFactoryModule module = scene.RequestModuleInterface<IAvatarFactoryModule>();
106 module.SendAppearance(sp.UUID);
107
108 return true; 108 return true;
109 } 109 }
110 110