diff options
author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2017-06-07 14:23:49 +0100 |
---|---|---|
committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2017-06-07 14:23:49 +0100 |
commit | c9baf4c66157c601cc4d4e325c7843b3bf9a0cad (patch) | |
tree | 20c09129ce8e72b8731c6c109c9e2a600783df44 /indra/newview/llviewermessage.cpp | |
parent | 74957676fc0b05825abc3af907241479f06fa8c3 (diff) |
SL-691,SL-694 - viewer can animate objects based on server messaging. First end-to-end demo for animated objects.
Diffstat (limited to 'indra/newview/llviewermessage.cpp')
-rw-r--r-- | indra/newview/llviewermessage.cpp | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 2b62ccd62f..7fd87f99d3 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -55,6 +55,7 @@ #include "llagentcamera.h" #include "llcallingcard.h" #include "llbuycurrencyhtml.h" +#include "llcontrolavatar.h" #include "llfirstuse.h" #include "llfloaterbump.h" #include "llfloaterbuyland.h" @@ -5099,22 +5100,28 @@ void process_object_animation(LLMessageSystem *mesgsys, void **user_data) S32 num_blocks = mesgsys->getNumberOfBlocksFast(_PREHASH_AnimationList); LL_WARNS() << "AXON handle object animation here, num_blocks " << num_blocks << LL_ENDL; - //avatarp->mSignaledAnimations.clear(); + LLControlAvatar *avatarp = volp->mControlAvatar; + if (!avatarp->mPlaying) + { + avatarp->mPlaying = true; + avatarp->updateGeom(volp); + } + avatarp->mSignaledAnimations.clear(); volp->setDebugText(llformat("Animations %d", num_blocks)); for( S32 i = 0; i < num_blocks; i++ ) { mesgsys->getUUIDFast(_PREHASH_AnimationList, _PREHASH_AnimID, animation_id, i); mesgsys->getS32Fast(_PREHASH_AnimationList, _PREHASH_AnimSequenceID, anim_sequence_id, i); - //avatarp->mSignaledAnimations[animation_id] = anim_sequence_id; + avatarp->mSignaledAnimations[animation_id] = anim_sequence_id; LL_INFOS() << "AXON got object animation request for object " << uuid << " animation id " << animation_id << LL_ENDL; } - if (num_blocks) + if (num_blocks >= 0) { LL_INFOS() << "AXON process animation state changes here" << LL_ENDL; - //avatarp->processAnimationStateChanges(); + avatarp->processAnimationStateChanges(); } } |