summaryrefslogtreecommitdiff
path: root/indra/newview/llagent.cpp
diff options
context:
space:
mode:
authorTofu Linden <tofu.linden@lindenlab.com>2010-02-10 14:13:59 +0000
committerTofu Linden <tofu.linden@lindenlab.com>2010-02-10 14:13:59 +0000
commit30f74e81dc9dc8660b8b5ceb41469373c5c92e64 (patch)
treec8c00a42d491523dae3c187884e5cb65e01f9a4f /indra/newview/llagent.cpp
parentbc9122feb959f4a9e38681908a48b679260acb73 (diff)
parent22dccc74a8fbcf3231d932db39781727833b9259 (diff)
PE merge.
Diffstat (limited to 'indra/newview/llagent.cpp')
-rw-r--r--indra/newview/llagent.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp
index 2354323a66..a061744f7c 100644
--- a/indra/newview/llagent.cpp
+++ b/indra/newview/llagent.cpp
@@ -4482,7 +4482,9 @@ void LLAgent::setCameraPosAndFocusGlobal(const LLVector3d& camera_pos, const LLV
{
const F64 ANIM_METERS_PER_SECOND = 10.0;
const F64 MIN_ANIM_SECONDS = 0.5;
+ const F64 MAX_ANIM_SECONDS = 10.0;
F64 anim_duration = llmax( MIN_ANIM_SECONDS, sqrt(focus_delta_squared) / ANIM_METERS_PER_SECOND );
+ anim_duration = llmin( anim_duration, MAX_ANIM_SECONDS );
setAnimationDuration( (F32)anim_duration );
}