diff options
Diffstat (limited to 'OpenSim/Services/Interfaces/IAvatarService.cs')
-rw-r--r-- | OpenSim/Services/Interfaces/IAvatarService.cs | 29 |
1 files changed, 23 insertions, 6 deletions
diff --git a/OpenSim/Services/Interfaces/IAvatarService.cs b/OpenSim/Services/Interfaces/IAvatarService.cs index 863fd93..c0130f1 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 | } |
@@ -195,7 +201,13 @@ namespace OpenSim.Services.Interfaces | |||
195 | appearance.Serial = Int32.Parse(Data["Serial"]); | 201 | appearance.Serial = Int32.Parse(Data["Serial"]); |
196 | 202 | ||
197 | if (Data.ContainsKey("AvatarHeight")) | 203 | if (Data.ContainsKey("AvatarHeight")) |
198 | appearance.AvatarHeight = float.Parse(Data["AvatarHeight"]); | 204 | { |
205 | float h = float.Parse(Data["AvatarHeight"]); | ||
206 | if( h == 0f) | ||
207 | h = 1.9f; | ||
208 | appearance.SetSize(new Vector3(0.45f, 0.6f, h )); | ||
209 | // appearance.AvatarHeight = float.Parse(Data["AvatarHeight"]); | ||
210 | } | ||
199 | 211 | ||
200 | // Legacy Wearables | 212 | // Legacy Wearables |
201 | if (Data.ContainsKey("BodyItem")) | 213 | if (Data.ContainsKey("BodyItem")) |
@@ -266,10 +278,14 @@ namespace OpenSim.Services.Interfaces | |||
266 | if (Data.ContainsKey("VisualParams")) | 278 | if (Data.ContainsKey("VisualParams")) |
267 | { | 279 | { |
268 | string[] vps = Data["VisualParams"].Split(new char[] {','}); | 280 | string[] vps = Data["VisualParams"].Split(new char[] {','}); |
269 | byte[] binary = new byte[AvatarAppearance.VISUALPARAM_COUNT]; | 281 | // byte[] binary = new byte[AvatarAppearance.VISUALPARAM_COUNT]; |
282 | |||
283 | // for (int i = 0 ; i < vps.Length && i < binary.Length ; i++) | ||
284 | byte[] binary = new byte[vps.Length]; | ||
270 | 285 | ||
271 | for (int i = 0 ; i < vps.Length && i < binary.Length ; i++) | 286 | for (int i = 0; i < vps.Length; i++) |
272 | binary[i] = (byte)Convert.ToInt32(vps[i]); | 287 | |
288 | binary[i] = (byte)Convert.ToInt32(vps[i]); | ||
273 | 289 | ||
274 | appearance.VisualParams = binary; | 290 | appearance.VisualParams = binary; |
275 | } | 291 | } |
@@ -329,6 +345,7 @@ namespace OpenSim.Services.Interfaces | |||
329 | appearance.Wearables[AvatarWearable.EYES].Wear( | 345 | appearance.Wearables[AvatarWearable.EYES].Wear( |
330 | AvatarWearable.DefaultWearables[ | 346 | AvatarWearable.DefaultWearables[ |
331 | AvatarWearable.EYES][0]); | 347 | AvatarWearable.EYES][0]); |
348 | |||
332 | } | 349 | } |
333 | catch | 350 | catch |
334 | { | 351 | { |