From d4d292258e31eee6d639106147758f39deae63e3 Mon Sep 17 00:00:00 2001 From: Ricky Curtice Date: Thu, 10 Mar 2011 22:07:06 -0800 Subject: 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. --- indra/newview/llhudeffectlookat.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llhudeffectlookat.cpp') 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) -- cgit v1.2.3