aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorMaster ScienceSim2010-10-21 16:48:58 -0700
committerMaster ScienceSim2010-10-21 16:48:58 -0700
commit267f18925d06ca05e2a5ffbfbb63582783762439 (patch)
tree3f2d00b3269a97ad75094f58137f56ebbb36aa35 /OpenSim/Region
parentMajor refactoring of appearance handling. (diff)
downloadopensim-SC_OLD-267f18925d06ca05e2a5ffbfbb63582783762439.zip
opensim-SC_OLD-267f18925d06ca05e2a5ffbfbb63582783762439.tar.gz
opensim-SC_OLD-267f18925d06ca05e2a5ffbfbb63582783762439.tar.bz2
opensim-SC_OLD-267f18925d06ca05e2a5ffbfbb63582783762439.tar.xz
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.
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs9
-rw-r--r--OpenSim/Region/OptionalModules/Scripting/Minimodule/SPAvatar.cs15
2 files changed, 11 insertions, 13 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index 5dc48d7..f828a2d 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -3657,15 +3657,16 @@ namespace OpenSim.Region.Framework.Scenes
3657 return; 3657 return;
3658 } 3658 }
3659 3659
3660 List<int> attPoints = m_appearance.GetAttachedPoints(); 3660 List<AvatarAttachment> attachments = m_appearance.GetAttachments();
3661 foreach (int p in attPoints) 3661 foreach (AvatarAttachment attach in attachments)
3662 { 3662 {
3663 if (m_isDeleted) 3663 if (m_isDeleted)
3664 return; 3664 return;
3665 3665
3666 UUID itemID = m_appearance.GetAttachedItem(p); 3666 int p = attach.AttachPoint;
3667 UUID itemID = attach.ItemID;
3667 3668
3668 //UUID assetID = m_appearance.GetAttachedAsset(p); 3669 //UUID assetID = attach.AssetID;
3669 // For some reason assetIDs are being written as Zero's in the DB -- need to track tat down 3670 // For some reason assetIDs are being written as Zero's in the DB -- need to track tat down
3670 // But they're not used anyway, the item is being looked up for now, so let's proceed. 3671 // But they're not used anyway, the item is being looked up for now, so let's proceed.
3671 //if (UUID.Zero == assetID) 3672 //if (UUID.Zero == assetID)
diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/SPAvatar.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/SPAvatar.cs
index 0786bd9..922eaaf 100644
--- a/OpenSim/Region/OptionalModules/Scripting/Minimodule/SPAvatar.cs
+++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/SPAvatar.cs
@@ -29,6 +29,7 @@ using System.Collections;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using System.Security; 30using System.Security;
31using OpenMetaverse; 31using OpenMetaverse;
32using OpenSim.Framework;
32using OpenSim.Region.Framework.Scenes; 33using OpenSim.Region.Framework.Scenes;
33using OpenSim.Region.Framework.Interfaces; 34using OpenSim.Region.Framework.Interfaces;
34 35
@@ -81,16 +82,12 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
81 get { 82 get {
82 List<IAvatarAttachment> attachments = new List<IAvatarAttachment>(); 83 List<IAvatarAttachment> attachments = new List<IAvatarAttachment>();
83 84
84 Hashtable internalAttachments = GetSP().Appearance.GetAttachments(); 85 List<AvatarAttachment> internalAttachments = GetSP().Appearance.GetAttachments();
85 if (internalAttachments != null) 86 foreach (AvatarAttachment attach in internalAttachments)
86 { 87 {
87 foreach (DictionaryEntry element in internalAttachments) 88 attachments.Add(new SPAvatarAttachment(m_rootScene, this, attach.AttachPoint,
88 { 89 new UUID(attach.ItemID),
89 Hashtable attachInfo = (Hashtable)element.Value; 90 new UUID(attach.AssetID), m_security));
90 attachments.Add(new SPAvatarAttachment(m_rootScene, this, (int) element.Key,
91 new UUID((string) attachInfo["item"]),
92 new UUID((string) attachInfo["asset"]), m_security));
93 }
94 } 91 }
95 92
96 return attachments.ToArray(); 93 return attachments.ToArray();