diff options
author | Eugene Mutavchi <emutavchi@productengine.com> | 2010-04-07 13:38:21 +0300 |
---|---|---|
committer | Eugene Mutavchi <emutavchi@productengine.com> | 2010-04-07 13:38:21 +0300 |
commit | 7dd71a60c51ed81c1ddfa98d09a158488a85b753 (patch) | |
tree | 595db6717d73ddd93b0462c7af8ee05ad11081e8 /indra/newview/llagent.cpp | |
parent | 8723a285fae8afa0ad7458c9a9ac00ac4504239b (diff) |
Fixed critical bug EXT-1655 ([BSI] Always flying after pressing "Stand" to stand up from an object)
- moved restoring the flying of the agent before calling the mAutoPilotFinishedCallback, to allow finished callback to change it.
- fixed LLVOAvatar::sitOnObject() to set mIsSitting = TRUE before stoping the autopilot, like it was in 1.23 version.
Reviewed by Mike Antipov at https://codereview.productengine.com/secondlife/r/185/
--HG--
branch : product-engine
Diffstat (limited to 'indra/newview/llagent.cpp')
-rw-r--r-- | indra/newview/llagent.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index 37d1bd15e1..056f406942 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -1295,6 +1295,11 @@ void LLAgent::stopAutoPilot(BOOL user_cancel) { resetAxes(mAutoPilotTargetFacing); } + // If the user cancelled, don't change the fly state + if (!user_cancel) + { + setFlying(mAutoPilotFlyOnStop); + } //NB: auto pilot can terminate for a reason other than reaching the destination if (mAutoPilotFinishedCallback) { @@ -1302,11 +1307,6 @@ void LLAgent::stopAutoPilot(BOOL user_cancel) } mLeaderID = LLUUID::null; - // If the user cancelled, don't change the fly state - if (!user_cancel) - { - setFlying(mAutoPilotFlyOnStop); - } setControlFlags(AGENT_CONTROL_STOP); if (user_cancel && !mAutoPilotBehaviorName.empty()) |