diff options
| author | Eugene Mutavchi <emutavchi@productengine.com> | 2010-04-19 13:32:07 +0300 |
|---|---|---|
| committer | Eugene Mutavchi <emutavchi@productengine.com> | 2010-04-19 13:32:07 +0300 |
| commit | ea6a3e8e7801425faa75fdd8a40b7990a58ee0d4 (patch) | |
| tree | 6ebda733a37537eb695d3cd266876182063b4861 /indra/newview/llagent.cpp | |
| parent | cda29adca1a4882d6201f7e232a26d561a1d33fd (diff) | |
Updated the reverted fix for critical bug EXT-1655 ([BSI] Always flying after pressing "Stand" to stand up from an object), also integrated the fix for EXT-6786 ('Stand' button is corrupted if movement control floater is opened). Added some clarifying comments.
Reviewed by Tofu Linden at https://codereview.productengine.com/secondlife/r/253/.
--HG--
branch : product-engine
Diffstat (limited to 'indra/newview/llagent.cpp')
| -rw-r--r-- | indra/newview/llagent.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index c5d7f6f118..5c54146caa 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -2296,6 +2296,13 @@ void LLAgent::stopAutoPilot(BOOL user_cancel) { resetAxes(mAutoPilotTargetFacing); } + // Restore previous flying state before invoking mAutoPilotFinishedCallback to allow + // callback function to change the flying state (like in near_sit_down_point()). + // 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) { @@ -2303,11 +2310,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()) |
