diff options
author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2018-03-02 13:00:18 +0000 |
---|---|---|
committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2018-03-02 13:00:18 +0000 |
commit | 9f8c6ace4a72c6a44d062df15d78c123772a72c0 (patch) | |
tree | 500492208cabd8d896c19a88cf5bf7eddf66eeab /indra/llprimitive/llmodel.cpp | |
parent | 28b95e4975f2333c0eb590b29740c3ce491a934d (diff) | |
parent | f8c76535a35aaf245e261357a59e977bac5b2501 (diff) |
merge
Diffstat (limited to 'indra/llprimitive/llmodel.cpp')
-rw-r--r-- | indra/llprimitive/llmodel.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/indra/llprimitive/llmodel.cpp b/indra/llprimitive/llmodel.cpp index 597cc66088..18f45d3b20 100644 --- a/indra/llprimitive/llmodel.cpp +++ b/indra/llprimitive/llmodel.cpp @@ -1035,8 +1035,11 @@ LLModel::weight_list& LLModel::getJointInfluences(const LLVector3& pos) { //no exact match found, get closest point const F32 epsilon = 1e-5f; weight_map::iterator iter_up = mSkinWeights.lower_bound(pos); - weight_map::iterator iter_down = ++iter_up; - + weight_map::iterator iter_down = iter_up; + if (iter_up != mSkinWeights.end()) + { + iter_down = ++iter_up; + } weight_map::iterator best = iter_up; F32 min_dist = (iter->first - pos).magVec(); @@ -1355,7 +1358,7 @@ bool LLModel::loadSkinInfo(LLSD& header, std::istream &is) LLSD skin_data; - if (unzip_llsd(skin_data, is, size)) + if (LLUZipHelper::unzip_llsd(skin_data, is, size) == LLUZipHelper::ZR_OK) { mSkinInfo.fromLLSD(skin_data); return true; @@ -1376,7 +1379,7 @@ bool LLModel::loadDecomposition(LLSD& header, std::istream& is) LLSD data; - if (unzip_llsd(data, is, size)) + if (LLUZipHelper::unzip_llsd(data, is, size) == LLUZipHelper::ZR_OK) { mPhysics.fromLLSD(data); updateHullCenters(); |