summaryrefslogtreecommitdiff
path: root/indra/newview/llhudeffectpointat.cpp
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2011-05-04 10:06:34 -0400
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2011-05-04 10:06:34 -0400
commit0be3b1fdd9821929fc537e1c812f26268979dbf0 (patch)
tree2848e2c95a4006e6c9e5fcad11fe9b1ab2488db3 /indra/newview/llhudeffectpointat.cpp
parent8decd5a4e6c94e27381186e581cf199ba3ede437 (diff)
parenta23ad02cf568b680a409cf40f69cfb1b1591082c (diff)
merge
Diffstat (limited to 'indra/newview/llhudeffectpointat.cpp')
-rw-r--r--indra/newview/llhudeffectpointat.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/indra/newview/llhudeffectpointat.cpp b/indra/newview/llhudeffectpointat.cpp
index bfb0f150b3..28fe8e1c01 100644
--- a/indra/newview/llhudeffectpointat.cpp
+++ b/indra/newview/llhudeffectpointat.cpp
@@ -48,7 +48,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;
// timeouts
// can't use actual F32_MAX, because we add this to the current frametime
@@ -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_SQUARED) &&
((current_time - mLastSendTime) > (1.f / MAX_SENDS_PER_SEC));
if (targetTypeChanged || targetPosChanged)