summaryrefslogtreecommitdiff
path: root/indra/newview/llhudeffectlookat.cpp
diff options
context:
space:
mode:
authorcallum <none@none>2011-05-04 10:36:27 -0700
committercallum <none@none>2011-05-04 10:36:27 -0700
commit3f9253e783826bbe27a995786be8305f8ecb2d6d (patch)
tree29408e5e249a8b4813095154fbba9bdeaa7f047d /indra/newview/llhudeffectlookat.cpp
parenta14172dd40fa11196950f391e4fc945e432122bf (diff)
parentb9bb792c478d703c6442351ecb563c0a67f77111 (diff)
Merge with http://bitbucket.org/lindenlab/viewer-development (r15992)
Diffstat (limited to 'indra/newview/llhudeffectlookat.cpp')
-rw-r--r--indra/newview/llhudeffectlookat.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/indra/newview/llhudeffectlookat.cpp b/indra/newview/llhudeffectlookat.cpp
index 72f64752d6..b380b3fe20 100644
--- a/indra/newview/llhudeffectlookat.cpp
+++ b/indra/newview/llhudeffectlookat.cpp
@@ -56,7 +56,7 @@ const S32 PKT_SIZE = 57;
// throttle
const F32 MAX_SENDS_PER_SEC = 4.f;
-const F32 MIN_DELTAPOS_FOR_UPDATE = 0.05f;
+const F32 MIN_DELTAPOS_FOR_UPDATE_SQUARED = 0.05f * 0.05f;
const F32 MIN_TARGET_OFFSET_SQUARED = 0.0001f;
@@ -416,7 +416,7 @@ BOOL LLHUDEffectLookAt::setLookAt(ELookAtType target_type, LLViewerObject *objec
BOOL lookAtChanged = (target_type != mTargetType) || (object != mTargetObject);
// lookat position has moved a certain amount and we haven't just sent an update
- lookAtChanged = lookAtChanged || ((dist_vec(position, mLastSentOffsetGlobal) > MIN_DELTAPOS_FOR_UPDATE) &&
+ lookAtChanged = lookAtChanged || ((dist_vec_squared(position, mLastSentOffsetGlobal) > MIN_DELTAPOS_FOR_UPDATE_SQUARED) &&
((current_time - mLastSendTime) > (1.f / MAX_SENDS_PER_SEC)));
if (lookAtChanged)