summaryrefslogtreecommitdiff
path: root/indra/newview/llhudeffectpointat.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/llhudeffectpointat.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/llhudeffectpointat.cpp')
-rw-r--r--indra/newview/llhudeffectpointat.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/indra/newview/llhudeffectpointat.cpp b/indra/newview/llhudeffectpointat.cpp
index bfb0f150b3..562d7cd4ed 100644
--- a/indra/newview/llhudeffectpointat.cpp
+++ b/indra/newview/llhudeffectpointat.cpp
@@ -244,7 +244,7 @@ BOOL LLHUDEffectPointAt::setPointAt(EPointAtType target_type, LLViewerObject *ob
BOOL targetTypeChanged = (target_type != mTargetType) ||
(object != mTargetObject);
- BOOL targetPosChanged = (dist_vec(position, mLastSentOffsetGlobal) > MIN_DELTAPOS_FOR_UPDATE) &&
+ BOOL targetPosChanged = (dist_vec_squared(position, mLastSentOffsetGlobal) > MIN_DELTAPOS_FOR_UPDATE * MIN_DELTAPOS_FOR_UPDATE) &&
((current_time - mLastSendTime) > (1.f / MAX_SENDS_PER_SEC));
if (targetTypeChanged || targetPosChanged)