summaryrefslogtreecommitdiff
path: root/indra/newview/llagent.cpp
diff options
context:
space:
mode:
authorMerov Linden <merov@lindenlab.com>2011-05-07 11:01:58 -0700
committerMerov Linden <merov@lindenlab.com>2011-05-07 11:01:58 -0700
commit460aa3ade72fe999eebccb390ae371dfdfeaf125 (patch)
tree0f74ec821139deb23057956e89ef7d814c82c671 /indra/newview/llagent.cpp
parentc03eb76bcf66665ee8a7618dbec0d13e3fc66c32 (diff)
parent51c779b5e832a0c303b4c84c7263c7fed3bd9b30 (diff)
Merge with viewer-experience
Diffstat (limited to 'indra/newview/llagent.cpp')
-rw-r--r--indra/newview/llagent.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp
index 7d491a7774..7319c0d902 100644
--- a/indra/newview/llagent.cpp
+++ b/indra/newview/llagent.cpp
@@ -62,6 +62,7 @@
#include "llstatusbar.h"
#include "llteleportflags.h"
#include "lltool.h"
+#include "lltoolpie.h"
#include "lltoolmgr.h"
#include "lltrans.h"
#include "llurlentry.h"
@@ -559,6 +560,8 @@ void LLAgent::setFlying(BOOL fly)
// static
void LLAgent::toggleFlying()
{
+ LLToolPie::instance().stopClickToWalk();
+
BOOL fly = !gAgent.getFlying();
gAgent.mMoveTimer.reset();
@@ -1337,7 +1340,7 @@ void LLAgent::stopAutoPilot(BOOL user_cancel)
//NB: auto pilot can terminate for a reason other than reaching the destination
if (mAutoPilotFinishedCallback)
{
- mAutoPilotFinishedCallback(!user_cancel && dist_vec(gAgent.getPositionGlobal(), mAutoPilotTargetGlobal) < mAutoPilotStopDistance, mAutoPilotCallbackData);
+ mAutoPilotFinishedCallback(!user_cancel && dist_vec_squared(gAgent.getPositionGlobal(), mAutoPilotTargetGlobal) < (mAutoPilotStopDistance * mAutoPilotStopDistance), mAutoPilotCallbackData);
}
mLeaderID = LLUUID::null;