From c73c2fb0707ee4dc78a354d932293f3e7e83ac50 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Fri, 7 Dec 2012 21:53:33 +0000 Subject: add some default size setting and checks --- OpenSim/Services/Interfaces/IAvatarService.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'OpenSim/Services/Interfaces/IAvatarService.cs') diff --git a/OpenSim/Services/Interfaces/IAvatarService.cs b/OpenSim/Services/Interfaces/IAvatarService.cs index 260e1c6..c0130f1 100644 --- a/OpenSim/Services/Interfaces/IAvatarService.cs +++ b/OpenSim/Services/Interfaces/IAvatarService.cs @@ -201,8 +201,13 @@ namespace OpenSim.Services.Interfaces appearance.Serial = Int32.Parse(Data["Serial"]); if (Data.ContainsKey("AvatarHeight")) - appearance.SetSize(new Vector3(0.45f, 0.6f, float.Parse(Data["AvatarHeight"]))); + { + float h = float.Parse(Data["AvatarHeight"]); + if( h == 0f) + h = 1.9f; + appearance.SetSize(new Vector3(0.45f, 0.6f, h )); // appearance.AvatarHeight = float.Parse(Data["AvatarHeight"]); + } // Legacy Wearables if (Data.ContainsKey("BodyItem")) -- cgit v1.1