aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Modules
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Environment/Modules')
-rw-r--r--OpenSim/Region/Environment/Modules/AvatarFactoryModule.cs20
1 files changed, 10 insertions, 10 deletions
diff --git a/OpenSim/Region/Environment/Modules/AvatarFactoryModule.cs b/OpenSim/Region/Environment/Modules/AvatarFactoryModule.cs
index b6c373c..c33fdcd 100644
--- a/OpenSim/Region/Environment/Modules/AvatarFactoryModule.cs
+++ b/OpenSim/Region/Environment/Modules/AvatarFactoryModule.cs
@@ -12,7 +12,7 @@ namespace OpenSim.Region.Environment.Modules
12 public class AvatarFactoryModule : IAvatarFactory 12 public class AvatarFactoryModule : IAvatarFactory
13 { 13 {
14 private Scene m_scene = null; 14 private Scene m_scene = null;
15 private Dictionary<LLUUID, AvatarWearing> m_avatarsClothes = new Dictionary<LLUUID, AvatarWearing>(); 15 private Dictionary<LLUUID, AvatarAppearance> m_avatarsClothes = new Dictionary<LLUUID, AvatarAppearance>();
16 16
17 public bool TryGetIntialAvatarAppearance(LLUUID avatarId, out AvatarWearable[] wearables, 17 public bool TryGetIntialAvatarAppearance(LLUUID avatarId, out AvatarWearable[] wearables,
18 out byte[] visualParams) 18 out byte[] visualParams)
@@ -20,13 +20,13 @@ namespace OpenSim.Region.Environment.Modules
20 if (!m_avatarsClothes.ContainsKey(avatarId)) 20 if (!m_avatarsClothes.ContainsKey(avatarId))
21 { 21 {
22 GetDefaultAvatarAppearance(out wearables, out visualParams); 22 GetDefaultAvatarAppearance(out wearables, out visualParams);
23 AvatarWearing wearing = new AvatarWearing(wearables); 23 AvatarAppearance wearing = new AvatarAppearance(wearables);
24 m_avatarsClothes[avatarId] = wearing; 24 m_avatarsClothes[avatarId] = wearing;
25 return true; 25 return true;
26 } 26 }
27 else 27 else
28 { 28 {
29 visualParams = SetDefaultVisualParams(); 29 visualParams = GetDefaultVisualParams();
30 wearables = m_avatarsClothes[avatarId].IsWearing; 30 wearables = m_avatarsClothes[avatarId].IsWearing;
31 return true; 31 return true;
32 } 32 }
@@ -91,7 +91,7 @@ namespace OpenSim.Region.Environment.Modules
91 //Tempoaray dictionary storage. This is be storing to a database 91 //Tempoaray dictionary storage. This is be storing to a database
92 if (m_avatarsClothes.ContainsKey(clientView.AgentId)) 92 if (m_avatarsClothes.ContainsKey(clientView.AgentId))
93 { 93 {
94 AvatarWearing avWearing = m_avatarsClothes[clientView.AgentId]; 94 AvatarAppearance avWearing = m_avatarsClothes[clientView.AgentId];
95 avWearing.IsWearing[wear.Type].AssetID = assetId; 95 avWearing.IsWearing[wear.Type].AssetID = assetId;
96 avWearing.IsWearing[wear.Type].ItemID = wear.ItemID; 96 avWearing.IsWearing[wear.Type].ItemID = wear.ItemID;
97 } 97 }
@@ -103,12 +103,11 @@ namespace OpenSim.Region.Environment.Modules
103 103
104 public static void GetDefaultAvatarAppearance(out AvatarWearable[] wearables, out byte[] visualParams) 104 public static void GetDefaultAvatarAppearance(out AvatarWearable[] wearables, out byte[] visualParams)
105 { 105 {
106 visualParams = SetDefaultVisualParams(); 106 visualParams = GetDefaultVisualParams();
107
108 wearables = AvatarWearable.DefaultWearables; 107 wearables = AvatarWearable.DefaultWearables;
109 } 108 }
110 109
111 private static byte[] SetDefaultVisualParams() 110 private static byte[] GetDefaultVisualParams()
112 { 111 {
113 byte[] visualParams; 112 byte[] visualParams;
114 visualParams = new byte[218]; 113 visualParams = new byte[218];
@@ -119,11 +118,12 @@ namespace OpenSim.Region.Environment.Modules
119 return visualParams; 118 return visualParams;
120 } 119 }
121 120
122 public class AvatarWearing 121 public class AvatarAppearance
123 { 122 {
124 public AvatarWearable[] IsWearing; 123 public AvatarWearable[] IsWearing;
124 public byte[] VisualParams;
125 125
126 public AvatarWearing() 126 public AvatarAppearance()
127 { 127 {
128 IsWearing = new AvatarWearable[13]; 128 IsWearing = new AvatarWearable[13];
129 for (int i = 0; i < 13; i++) 129 for (int i = 0; i < 13; i++)
@@ -132,7 +132,7 @@ namespace OpenSim.Region.Environment.Modules
132 } 132 }
133 } 133 }
134 134
135 public AvatarWearing(AvatarWearable[] wearing) 135 public AvatarAppearance(AvatarWearable[] wearing)
136 { 136 {
137 if (wearing.Length == 13) 137 if (wearing.Length == 13)
138 { 138 {