diff options
Diffstat (limited to 'OpenSim/Framework/AvatarAppearance.cs')
-rw-r--r-- | OpenSim/Framework/AvatarAppearance.cs | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/OpenSim/Framework/AvatarAppearance.cs b/OpenSim/Framework/AvatarAppearance.cs index b01b8da..2183fb6 100644 --- a/OpenSim/Framework/AvatarAppearance.cs +++ b/OpenSim/Framework/AvatarAppearance.cs | |||
@@ -40,10 +40,12 @@ namespace OpenSim.Framework | |||
40 | /// </summary> | 40 | /// </summary> |
41 | public class AvatarAppearance | 41 | public class AvatarAppearance |
42 | { | 42 | { |
43 | // SL box diferent to size | ||
43 | const float AVBOXAJUST = 0.2f; | 44 | const float AVBOXAJUST = 0.2f; |
45 | // constrains for ubitode physics | ||
44 | const float AVBOXMINX = 0.2f; | 46 | const float AVBOXMINX = 0.2f; |
45 | const float AVBOXMINY = 0.3f; | 47 | const float AVBOXMINY = 0.3f; |
46 | const float AVBOXMINZ = 0.5f; | 48 | const float AVBOXMINZ = 1.2f; |
47 | 49 | ||
48 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 50 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
49 | 51 | ||
@@ -60,7 +62,7 @@ namespace OpenSim.Framework | |||
60 | protected AvatarWearable[] m_wearables; | 62 | protected AvatarWearable[] m_wearables; |
61 | protected Dictionary<int, List<AvatarAttachment>> m_attachments; | 63 | protected Dictionary<int, List<AvatarAttachment>> m_attachments; |
62 | protected float m_avatarHeight = 0; | 64 | protected float m_avatarHeight = 0; |
63 | protected Vector3 m_avatarSize = new Vector3(0.45f, 0.6f, 1.9f); | 65 | protected Vector3 m_avatarSize = new Vector3(0.45f, 0.6f, 1.9f); // sl Z cloud value |
64 | protected Vector3 m_avatarBoxSize = new Vector3(0.45f, 0.6f, 1.9f); | 66 | protected Vector3 m_avatarBoxSize = new Vector3(0.45f, 0.6f, 1.9f); |
65 | protected float m_avatarFeetOffset = 0; | 67 | protected float m_avatarFeetOffset = 0; |
66 | protected float m_avatarAnimOffset = 0; | 68 | protected float m_avatarAnimOffset = 0; |
@@ -157,6 +159,8 @@ namespace OpenSim.Framework | |||
157 | SetDefaultParams(); | 159 | SetDefaultParams(); |
158 | 160 | ||
159 | // SetHeight(); | 161 | // SetHeight(); |
162 | if(m_avatarHeight == 0) | ||
163 | SetSize(new Vector3(0.45f,0.6f,1.9f)); | ||
160 | 164 | ||
161 | m_attachments = new Dictionary<int, List<AvatarAttachment>>(); | 165 | m_attachments = new Dictionary<int, List<AvatarAttachment>>(); |
162 | } | 166 | } |
@@ -408,6 +412,20 @@ namespace OpenSim.Framework | |||
408 | 412 | ||
409 | public void SetSize(Vector3 avSize) | 413 | public void SetSize(Vector3 avSize) |
410 | { | 414 | { |
415 | if (avSize.X > 32f) | ||
416 | avSize.X = 32f; | ||
417 | else if (avSize.X < 0.1f) | ||
418 | avSize.X = 0.1f; | ||
419 | |||
420 | if (avSize.Y > 32f) | ||
421 | avSize.Y = 32f; | ||
422 | else if (avSize.Y < 0.1f) | ||
423 | avSize.Y = 0.1f; | ||
424 | if (avSize.Z > 32f) | ||
425 | avSize.Z = 32f; | ||
426 | else if (avSize.Z < 0.1f) | ||
427 | avSize.Z = 0.1f; | ||
428 | |||
411 | m_avatarSize = avSize; | 429 | m_avatarSize = avSize; |
412 | m_avatarBoxSize = avSize; | 430 | m_avatarBoxSize = avSize; |
413 | m_avatarBoxSize.Z += AVBOXAJUST; | 431 | m_avatarBoxSize.Z += AVBOXAJUST; |