aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services/Interfaces/IAvatarService.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Services/Interfaces/IAvatarService.cs')
-rw-r--r--OpenSim/Services/Interfaces/IAvatarService.cs29
1 files changed, 23 insertions, 6 deletions
diff --git a/OpenSim/Services/Interfaces/IAvatarService.cs b/OpenSim/Services/Interfaces/IAvatarService.cs
index 6ca0b15..3663a7a 100644
--- a/OpenSim/Services/Interfaces/IAvatarService.cs
+++ b/OpenSim/Services/Interfaces/IAvatarService.cs
@@ -162,10 +162,16 @@ namespace OpenSim.Services.Interfaces
162 } 162 }
163 163
164 // Visual Params 164 // Visual Params
165 string[] vps = new string[AvatarAppearance.VISUALPARAM_COUNT]; 165 // string[] vps = new string[AvatarAppearance.VISUALPARAM_COUNT];
166 // byte[] binary = appearance.VisualParams;
167
168 // for (int i = 0 ; i < AvatarAppearance.VISUALPARAM_COUNT ; i++)
169
170
166 byte[] binary = appearance.VisualParams; 171 byte[] binary = appearance.VisualParams;
172 string[] vps = new string[binary.Length];
167 173
168 for (int i = 0 ; i < AvatarAppearance.VISUALPARAM_COUNT ; i++) 174 for (int i = 0; i < binary.Length; i++)
169 { 175 {
170 vps[i] = binary[i].ToString(); 176 vps[i] = binary[i].ToString();
171 } 177 }
@@ -202,7 +208,13 @@ namespace OpenSim.Services.Interfaces
202 appearance.Serial = Int32.Parse(Data["Serial"]); 208 appearance.Serial = Int32.Parse(Data["Serial"]);
203 209
204 if (Data.ContainsKey("AvatarHeight")) 210 if (Data.ContainsKey("AvatarHeight"))
205 appearance.AvatarHeight = float.Parse(Data["AvatarHeight"]); 211 {
212 float h = float.Parse(Data["AvatarHeight"]);
213 if( h == 0f)
214 h = 1.9f;
215 appearance.SetSize(new Vector3(0.45f, 0.6f, h ));
216// appearance.AvatarHeight = float.Parse(Data["AvatarHeight"]);
217 }
206 218
207 // Legacy Wearables 219 // Legacy Wearables
208 if (Data.ContainsKey("BodyItem")) 220 if (Data.ContainsKey("BodyItem"))
@@ -273,10 +285,14 @@ namespace OpenSim.Services.Interfaces
273 if (Data.ContainsKey("VisualParams")) 285 if (Data.ContainsKey("VisualParams"))
274 { 286 {
275 string[] vps = Data["VisualParams"].Split(new char[] {','}); 287 string[] vps = Data["VisualParams"].Split(new char[] {','});
276 byte[] binary = new byte[AvatarAppearance.VISUALPARAM_COUNT]; 288 // byte[] binary = new byte[AvatarAppearance.VISUALPARAM_COUNT];
289
290 // for (int i = 0 ; i < vps.Length && i < binary.Length ; i++)
291 byte[] binary = new byte[vps.Length];
277 292
278 for (int i = 0 ; i < vps.Length && i < binary.Length ; i++) 293 for (int i = 0; i < vps.Length; i++)
279 binary[i] = (byte)Convert.ToInt32(vps[i]); 294
295 binary[i] = (byte)Convert.ToInt32(vps[i]);
280 296
281 appearance.VisualParams = binary; 297 appearance.VisualParams = binary;
282 } 298 }
@@ -342,6 +358,7 @@ namespace OpenSim.Services.Interfaces
342 appearance.Wearables[AvatarWearable.EYES].Wear( 358 appearance.Wearables[AvatarWearable.EYES].Wear(
343 AvatarWearable.DefaultWearables[ 359 AvatarWearable.DefaultWearables[
344 AvatarWearable.EYES][0]); 360 AvatarWearable.EYES][0]);
361
345 } 362 }
346 catch 363 catch
347 { 364 {