summaryrefslogtreecommitdiff
path: root/indra/newview/llagent.cpp
diff options
context:
space:
mode:
authorTofu Linden <tofu.linden@lindenlab.com>2010-02-10 07:21:34 +0000
committerTofu Linden <tofu.linden@lindenlab.com>2010-02-10 07:21:34 +0000
commita4ef5e2b0d4e36aa98f2e4074f4ddd4cad3d3106 (patch)
treecd05fd1a94494a90e1ed6f10e5a451e86b164443 /indra/newview/llagent.cpp
parent3eadfd1502a8dcb3e04a9455edf24ae54402317a (diff)
parent22dccc74a8fbcf3231d932db39781727833b9259 (diff)
merge from viewer2 trunk.
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 9f2186f7f7..37d3bbec7f 100644
--- a/indra/newview/llagent.cpp
+++ b/indra/newview/llagent.cpp
@@ -4485,7 +4485,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 );
}