From b903d2ca963d5f68803a1cabbd033f89ab72634a Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Tue, 6 Sep 2011 01:59:21 +0100 Subject: In SetAttachment, if the existing attachment has no asset id then carry on rather than abort. When a user logs in, the attachment item ids are pulled from persistence in the Avatars table. However, the asset ids are not saved. When the avatar enters a simulator the attachments are set again. If we simply perform an item check then the asset ids (which are now present) are never set, and NPC attachments later fail unless the attachment is detached and reattached. Hopefully resolves part of http://opensimulator.org/mantis/view.php?id=5653 --- OpenSim/Services/Interfaces/IAvatarService.cs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'OpenSim/Services/Interfaces') diff --git a/OpenSim/Services/Interfaces/IAvatarService.cs b/OpenSim/Services/Interfaces/IAvatarService.cs index 0d5ab7d..cda7113 100644 --- a/OpenSim/Services/Interfaces/IAvatarService.cs +++ b/OpenSim/Services/Interfaces/IAvatarService.cs @@ -262,7 +262,6 @@ namespace OpenSim.Services.Interfaces UUID.Parse(Data["SkirtItem"]), UUID.Parse(Data["SkirtAsset"])); - if (Data.ContainsKey("VisualParams")) { string[] vps = Data["VisualParams"].Split(new char[] {','}); @@ -291,7 +290,6 @@ namespace OpenSim.Services.Interfaces } } - // Attachments Dictionary attchs = new Dictionary(); foreach (KeyValuePair _kvp in Data) @@ -308,7 +306,7 @@ namespace OpenSim.Services.Interfaces UUID uuid = UUID.Zero; UUID.TryParse(_kvp.Value, out uuid); - appearance.SetAttachment(point,uuid,UUID.Zero); + appearance.SetAttachment(point, uuid, UUID.Zero); } if (appearance.Wearables[AvatarWearable.BODY].Count == 0) -- cgit v1.1