Fix NPC appearance setting to include attachments again

avinationmerge
Melanie 2012-02-27 08:49:19 +01:00
parent d46235f5a3
commit d342008e5b
1 changed files with 4 additions and 1 deletions

View File

@ -99,8 +99,11 @@ namespace OpenSim.Region.OptionalModules.World.NPC
// Delete existing sp attachments // Delete existing sp attachments
scene.AttachmentsModule.DeleteAttachmentsFromScene(sp, false); scene.AttachmentsModule.DeleteAttachmentsFromScene(sp, false);
AvatarAppearance app = new AvatarAppearance(appearance, true);
sp.Appearance = app;
// Set new sp appearance. Also sends to clients. // Set new sp appearance. Also sends to clients.
scene.RequestModuleInterface<IAvatarFactoryModule>().SetAppearance(sp, new AvatarAppearance(appearance, true)); scene.RequestModuleInterface<IAvatarFactoryModule>().SetAppearance(sp, app);
// Rez needed sp attachments // Rez needed sp attachments
scene.AttachmentsModule.RezAttachments(sp); scene.AttachmentsModule.RezAttachments(sp);