aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorMW2007-12-02 18:49:42 +0000
committerMW2007-12-02 18:49:42 +0000
commit5ae8759de16875309cdd0fccf5d3bb24bac483d6 (patch)
treed79c6661d5aedb417dcb86db9edc3a5e2d49f558 /OpenSim/Region
parentVery partial Avatar Appearance (ie, clothes/body parts) "storage". In standal... (diff)
downloadopensim-SC-5ae8759de16875309cdd0fccf5d3bb24bac483d6.zip
opensim-SC-5ae8759de16875309cdd0fccf5d3bb24bac483d6.tar.gz
opensim-SC-5ae8759de16875309cdd0fccf5d3bb24bac483d6.tar.bz2
opensim-SC-5ae8759de16875309cdd0fccf5d3bb24bac483d6.tar.xz
Added some error handling (and console output) to BaseHttpServer.
a few other bits of refactoring.
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/Environment/Modules/AvatarFactoryModule.cs20
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs3
-rw-r--r--OpenSim/Region/Environment/Scenes/ScenePresence.cs3
3 files changed, 11 insertions, 15 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 {
diff --git a/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs b/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs
index 435022b..745345d 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs
@@ -190,9 +190,6 @@ namespace OpenSim.Region.Environment.Scenes
190 } 190 }
191 replyPacket.Data = searchData; 191 replyPacket.Data = searchData;
192 client.SendAvatarPickerReply(replyPacket); 192 client.SendAvatarPickerReply(replyPacket);
193
194
195 } 193 }
196
197 } 194 }
198} \ No newline at end of file 195} \ No newline at end of file
diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.cs
index 46079bb..2ef27fd 100644
--- a/OpenSim/Region/Environment/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Environment/Scenes/ScenePresence.cs
@@ -511,8 +511,7 @@ namespace OpenSim.Region.Environment.Scenes
511 for (int i = 0; i < visualParam.Length; i++) 511 for (int i = 0; i < visualParam.Length; i++)
512 { 512 {
513 m_visualParams[i] = visualParam[i].ParamValue; 513 m_visualParams[i] = visualParam[i].ParamValue;
514 //OpenSim.Framework.Console.MainLog.Instance.Verbose("CLIENT", "VisualData[" + i.ToString() + "]: " + visualParam[i].ParamValue.ToString() + "m"); 514 //OpenSim.Framework.Console.MainLog.Instance.Verbose("CLIENT", "VisualData[" + i.ToString() + "]: " + visualParam[i].ParamValue.ToString() + "m");
515
516 } 515 }
517 516
518 // Teravus : Nifty AV Height Getting Maaaaagical formula. Oh how we love turning 0-255 into meters. 517 // Teravus : Nifty AV Height Getting Maaaaagical formula. Oh how we love turning 0-255 into meters.