diff options
author | Aimee Linden <aimee@lindenlab.com> | 2010-02-11 14:53:11 +0000 |
---|---|---|
committer | Aimee Linden <aimee@lindenlab.com> | 2010-02-11 14:53:11 +0000 |
commit | d7e8a30a5a9bd416254f83e20054c73edf3f890d (patch) | |
tree | 43a156ca397913ce7da626ac9c002e1036f2460c /indra/newview/llagent.cpp | |
parent | 898e9da1af113704e2e10328dfa5396deb24eb30 (diff) | |
parent | 1b8a7fdeaab78216baad1f916e9788c0b90287b3 (diff) |
merge with ssh://hg.lindenlab.com/viewer/viewer-2-0
Diffstat (limited to 'indra/newview/llagent.cpp')
-rw-r--r-- | indra/newview/llagent.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index 2354323a66..59f61dfdfb 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -956,6 +956,7 @@ void LLAgent::sendMessage() if (!mRegionp) { llerrs << "No region for agent yet!" << llendl; + return; } gMessageSystem->sendMessage(mRegionp->getHost()); } @@ -4482,7 +4483,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 ); } |