diff options
author | Dave SIMmONs <simon@lindenlab.com> | 2011-05-02 09:05:56 -0700 |
---|---|---|
committer | Dave SIMmONs <simon@lindenlab.com> | 2011-05-02 09:05:56 -0700 |
commit | f393774caf49313f24d33cb2b33b6ad92c70977f (patch) | |
tree | ebdaf44b4c3152362f3e9b18c227bd09d39031d5 /indra/newview/llhudeffectlookat.cpp | |
parent | 31e16be0daa10e6d66b133c308130524a7a0d881 (diff) | |
parent | b9bb792c478d703c6442351ecb563c0a67f77111 (diff) |
Merge from lindenlab/viewer-development
Diffstat (limited to 'indra/newview/llhudeffectlookat.cpp')
-rw-r--r-- | indra/newview/llhudeffectlookat.cpp | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/indra/newview/llhudeffectlookat.cpp b/indra/newview/llhudeffectlookat.cpp index 8cf7d23f88..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) @@ -587,11 +587,6 @@ void LLHUDEffectLookAt::update() */ bool LLHUDEffectLookAt::calcTargetPosition() { - if (gNoRender) - { - return false; - } - LLViewerObject *target_obj = (LLViewerObject *)mTargetObject; LLVector3 local_offset; |