diff options
author | prep <prep@lindenlab.com> | 2011-07-28 16:09:17 -0400 |
---|---|---|
committer | prep <prep@lindenlab.com> | 2011-07-28 16:09:17 -0400 |
commit | 7fc12cd43dcb21df88be5c47c319d0d3f6498216 (patch) | |
tree | 601277df1789818bb52066f2b65a3a9453112306 /indra/llprimitive/llmodel.cpp | |
parent | 9395bcee52a9786185d90c52a22564b1d975e4ea (diff) |
Fix for sh-2044, sh-2039 and sh-2166 (Avatar weights were sometimes not correctly applied upon import.
Diffstat (limited to 'indra/llprimitive/llmodel.cpp')
-rw-r--r-- | indra/llprimitive/llmodel.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/indra/llprimitive/llmodel.cpp b/indra/llprimitive/llmodel.cpp index ea0ea931af..def276c808 100644 --- a/indra/llprimitive/llmodel.cpp +++ b/indra/llprimitive/llmodel.cpp @@ -1692,13 +1692,13 @@ LLModel::weight_list& LLModel::getJointInfluences(const LLVector3& pos) } else { //no exact match found, get closest point - const F32 epsilon = 2.f/65536; + const F32 epsilon = 1e-5f; weight_map::iterator iter_up = mSkinWeights.lower_bound(pos); weight_map::iterator iter_down = ++iter_up; weight_map::iterator best = iter_up; - F32 min_dist = (iter->first - pos).magVecSquared(); + F32 min_dist = (iter->first - pos).magVec(); bool done = false; while (!done) @@ -1709,7 +1709,7 @@ LLModel::weight_list& LLModel::getJointInfluences(const LLVector3& pos) if (iter_up != mSkinWeights.end() && ++iter_up != mSkinWeights.end()) { done = false; - F32 dist = (iter_up->first - pos).magVecSquared(); + F32 dist = (iter_up->first - pos).magVec(); if (dist < epsilon) { @@ -1727,7 +1727,7 @@ LLModel::weight_list& LLModel::getJointInfluences(const LLVector3& pos) { done = false; - F32 dist = (iter_down->first - pos).magVecSquared(); + F32 dist = (iter_down->first - pos).magVec(); if (dist < epsilon) { |