summaryrefslogtreecommitdiff
path: root/indra/newview/llcontrolavatar.cpp
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2018-10-02 22:02:42 +0100
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2018-10-02 22:02:42 +0100
commit5bb0b393a9ee634db1fbbde2645a6374704e184c (patch)
treef4b9a28c23286443f871817dd9e4409dea4aff9b /indra/newview/llcontrolavatar.cpp
parentaacb7eb25fd4caceaafb145ed550e14cebeef665 (diff)
SL-966 - behavior improvements and visualization, bonus removal of unrelated duplicate code in llappviewer.cpp
Diffstat (limited to 'indra/newview/llcontrolavatar.cpp')
-rw-r--r--indra/newview/llcontrolavatar.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/indra/newview/llcontrolavatar.cpp b/indra/newview/llcontrolavatar.cpp
index 28c02b0434..18d6e6d6e7 100644
--- a/indra/newview/llcontrolavatar.cpp
+++ b/indra/newview/llcontrolavatar.cpp
@@ -35,6 +35,8 @@
#include "llviewerregion.h"
#include "llskinningutil.h"
+//#pragma optimize("", off)
+
const F32 LLControlAvatar::MAX_LEGAL_OFFSET = 3.0f;
const F32 LLControlAvatar::MAX_LEGAL_SIZE = 64.0f;
@@ -111,9 +113,16 @@ void LLControlAvatar::getNewConstraintFixups(LLVector3& new_pos_fixup, F32& new_
LL_DEBUGS("ConstraintFix") << getFullname() << " pos fix, offset_dist " << offset_dist << " pos fixup "
<< new_pos_fixup << " was " << mPositionConstraintFixup << LL_ENDL;
}
- else if (offset_dist < max_legal_offset-1 && mPositionConstraintFixup.length()>0.01f)
+ else if (offset_dist < max_legal_offset-1)
{
- new_pos_fixup = mPositionConstraintFixup * 0.9;
+ if (mPositionConstraintFixup.length()>0.01f)
+ {
+ new_pos_fixup = mPositionConstraintFixup * 0.9;
+ }
+ else
+ {
+ new_pos_fixup = LLVector3();
+ }
LL_DEBUGS("ConstraintFix") << getFullname() << " pos fixup reduced "
<< new_pos_fixup << " was " << mPositionConstraintFixup << LL_ENDL;
}