diff options
Diffstat (limited to 'OpenSim/Framework/AvatarAppearance.cs')
-rw-r--r-- | OpenSim/Framework/AvatarAppearance.cs | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/OpenSim/Framework/AvatarAppearance.cs b/OpenSim/Framework/AvatarAppearance.cs index f2ceb20..f549461 100644 --- a/OpenSim/Framework/AvatarAppearance.cs +++ b/OpenSim/Framework/AvatarAppearance.cs | |||
@@ -227,6 +227,7 @@ namespace OpenSim.Framework | |||
227 | } | 227 | } |
228 | 228 | ||
229 | protected float m_avatarHeight = 0; | 229 | protected float m_avatarHeight = 0; |
230 | protected float m_hipOffset = 0; | ||
230 | 231 | ||
231 | public virtual float AvatarHeight | 232 | public virtual float AvatarHeight |
232 | { | 233 | { |
@@ -234,6 +235,11 @@ namespace OpenSim.Framework | |||
234 | set { m_avatarHeight = value; } | 235 | set { m_avatarHeight = value; } |
235 | } | 236 | } |
236 | 237 | ||
238 | public virtual float HipOffset | ||
239 | { | ||
240 | get { return m_hipOffset; } | ||
241 | } | ||
242 | |||
237 | public AvatarAppearance() | 243 | public AvatarAppearance() |
238 | { | 244 | { |
239 | m_wearables = new AvatarWearable[MAX_WEARABLES]; | 245 | m_wearables = new AvatarWearable[MAX_WEARABLES]; |
@@ -275,7 +281,12 @@ namespace OpenSim.Framework | |||
275 | + 0.08f * (float)m_visualparams[77] / 255.0f // Shoe heel height | 281 | + 0.08f * (float)m_visualparams[77] / 255.0f // Shoe heel height |
276 | + 0.07f * (float)m_visualparams[78] / 255.0f // Shoe platform height | 282 | + 0.07f * (float)m_visualparams[78] / 255.0f // Shoe platform height |
277 | + 0.076f * (float)m_visualparams[148] / 255.0f; // Neck length | 283 | + 0.076f * (float)m_visualparams[148] / 255.0f; // Neck length |
278 | 284 | m_hipOffset = (0.615385f // Half of avatar | |
285 | + 0.08f * (float)m_visualparams[77] / 255.0f // Shoe heel height | ||
286 | + 0.07f * (float)m_visualparams[78] / 255.0f // Shoe platform height | ||
287 | + 0.3836f * (float)m_visualparams[125] / 255.0f // Leg length | ||
288 | - m_avatarHeight / 2) * 0.3f - 0.04f; | ||
289 | System.Console.WriteLine("Height {0} Hip offset {1}", m_avatarHeight, m_hipOffset); | ||
279 | } | 290 | } |
280 | 291 | ||
281 | public virtual void SetWearable(int wearableId, AvatarWearable wearable) | 292 | public virtual void SetWearable(int wearableId, AvatarWearable wearable) |