diff options
author | Sergei Litovchuk <slitovchuk@productengine.com> | 2009-12-29 20:47:11 +0200 |
---|---|---|
committer | Sergei Litovchuk <slitovchuk@productengine.com> | 2009-12-29 20:47:11 +0200 |
commit | 383cb255e0ff619fa4ee3fc0b1dc6a37643d3bc1 (patch) | |
tree | 4e22cd93857d29e0f8565265afafb441a262ec8a | |
parent | 40e069057ee9af4c6bb5f39550aad565dce42735 (diff) |
Fixed low bug (EXT-2781) Stop Flying button is displayed while walking after slumping.
- Disabled 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 because of some server side problem, the agent's avatar does not play flying animation, so we switch flying mode off. This may cause "Stop Flying" button to blink.
--HG--
branch : product-engine
-rw-r--r-- | indra/newview/llagent.cpp | 6 | ||||
-rw-r--r-- | indra/newview/llviewermessage.cpp | 11 |
2 files changed, 16 insertions, 1 deletions
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index 628982973c..79b0527a74 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -747,7 +747,11 @@ void LLAgent::setFlying(BOOL fly) { if (mAvatarObject.notNull()) { - if(mAvatarObject->mSignaledAnimations.find(ANIM_AGENT_STANDUP) != mAvatarObject->mSignaledAnimations.end()) + // *HACK: Don't allow to start the flying mode if we got ANIM_AGENT_STANDUP signal + // because in this case we won't get a signal to start avatar flying animation and + // it will be walking with flying mode "ON" indication. However we allow to switch + // the flying mode off if we get ANIM_AGENT_STANDUP signal. See process_avatar_animation(). + if(fly && mAvatarObject->mSignaledAnimations.find(ANIM_AGENT_STANDUP) != mAvatarObject->mSignaledAnimations.end()) { return; } 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); |