First attempt to get multiple attachments working to support viewer2.

The attachment code appears to work correctly for 1.23 viewers so, in
spite of some big changes in the internal representation, there don't
appear to be regressions. That being said, I still can't get a viewer2
avatar to show correctly.
This commit is contained in:
Master ScienceSim
2010-10-21 16:48:58 -07:00
parent b1c8d05888
commit 267f18925d
6 changed files with 100 additions and 111 deletions

View File

@@ -29,6 +29,7 @@ using System.Collections;
using System.Collections.Generic;
using System.Security;
using OpenMetaverse;
using OpenSim.Framework;
using OpenSim.Region.Framework.Scenes;
using OpenSim.Region.Framework.Interfaces;
@@ -81,16 +82,12 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
get {
List<IAvatarAttachment> attachments = new List<IAvatarAttachment>();
Hashtable internalAttachments = GetSP().Appearance.GetAttachments();
if (internalAttachments != null)
List<AvatarAttachment> internalAttachments = GetSP().Appearance.GetAttachments();
foreach (AvatarAttachment attach in internalAttachments)
{
foreach (DictionaryEntry element in internalAttachments)
{
Hashtable attachInfo = (Hashtable)element.Value;
attachments.Add(new SPAvatarAttachment(m_rootScene, this, (int) element.Key,
new UUID((string) attachInfo["item"]),
new UUID((string) attachInfo["asset"]), m_security));
}
attachments.Add(new SPAvatarAttachment(m_rootScene, this, attach.AttachPoint,
new UUID(attach.ItemID),
new UUID(attach.AssetID), m_security));
}
return attachments.ToArray();