summaryrefslogtreecommitdiff
path: root/indra/newview/llhudeffectlookat.cpp
diff options
context:
space:
mode:
authorRicky Curtice <kf6kjg+hg@gmail.com>2011-03-10 22:07:06 -0800
committerRicky Curtice <kf6kjg+hg@gmail.com>2011-03-10 22:07:06 -0800
commitd4d292258e31eee6d639106147758f39deae63e3 (patch)
tree577571cc2d4cdef5aa24706520b790f56b875c1c /indra/newview/llhudeffectlookat.cpp
parent1426765e82549ec9d17a0f90d902f25c0e785bbd (diff)
Squared all dist_vec() based comparisons and other dist_vec() operations where sensible.
Not all instances of dist_vec() were squared, only those where it wouldn't (hopefully) change the functionality.
Diffstat (limited to 'indra/newview/llhudeffectlookat.cpp')
-rw-r--r--indra/newview/llhudeffectlookat.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/indra/newview/llhudeffectlookat.cpp b/indra/newview/llhudeffectlookat.cpp
index 8cf7d23f88..10ee6f1d39 100644
--- a/indra/newview/llhudeffectlookat.cpp
+++ b/indra/newview/llhudeffectlookat.cpp
@@ -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 * MIN_DELTAPOS_FOR_UPDATE) &&
((current_time - mLastSendTime) > (1.f / MAX_SENDS_PER_SEC)));
if (lookAtChanged)