summaryrefslogtreecommitdiff
path: root/indra/newview/llviewermessage.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llviewermessage.cpp')
-rw-r--r--indra/newview/llviewermessage.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index 87045d2abf..f9f778449b 100644
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -33,6 +33,7 @@
#include "llviewerprecompiledheaders.h"
#include "llviewermessage.h"
+#include "llanimationstates.h"
#include "llaudioengine.h"
#include "lscript_byteformat.h"
#include "lleconomy.h"
@@ -3941,6 +3942,16 @@ void process_avatar_animation(LLMessageSystem *mesgsys, void **user_data)
avatarp->mSignaledAnimations[animation_id] = anim_sequence_id;
+ // *HACK: Disabling flying mode if it has been enabled shortly before the agent
+ // stand up animation is signaled. In this case we don't get a signal to start
+ // flying animation from server, the AGENT_CONTROL_FLY flag remains set but the
+ // avatar does not play flying animation, so we switch flying mode off.
+ // See LLAgent::setFlying(). This may cause "Stop Flying" button to blink.
+ if (animation_id == ANIM_AGENT_STANDUP && gAgent.getFlying())
+ {
+ gAgent.setFlying(FALSE);
+ }
+
if (i < num_source_blocks)
{
mesgsys->getUUIDFast(_PREHASH_AnimationSourceList, _PREHASH_ObjectID, object_id, i);