diff options
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llcontrolavatar.cpp | 7 | ||||
-rw-r--r-- | indra/newview/llcontrolavatar.h | 14 | ||||
-rw-r--r-- | indra/newview/llviewermessage.cpp | 28 | ||||
-rw-r--r-- | indra/newview/llviewerobject.cpp | 1 | ||||
-rw-r--r-- | indra/newview/llvovolume.h | 2 |
5 files changed, 33 insertions, 19 deletions
diff --git a/indra/newview/llcontrolavatar.cpp b/indra/newview/llcontrolavatar.cpp index d655f2cd37..f298a8884b 100644 --- a/indra/newview/llcontrolavatar.cpp +++ b/indra/newview/llcontrolavatar.cpp @@ -367,8 +367,9 @@ void LLControlAvatar::updateAnimations() for (std::vector<LLVOVolume*>::iterator vol_it = volumes.begin(); vol_it != volumes.end(); ++vol_it) { LLVOVolume *volp = *vol_it; - for (std::map<LLUUID,S32>::iterator anim_it = volp->mObjectSignaledAnimations.begin(); - anim_it != volp->mObjectSignaledAnimations.end(); + signaled_animation_map_t& signaled_animations = LLObjectSignaledAnimationMap::instance().getMap()[volp->getID()]; + for (std::map<LLUUID,S32>::iterator anim_it = signaled_animations.begin(); + anim_it != signaled_animations.end(); ++anim_it) { std::map<LLUUID,S32>::iterator found_anim_it = anims.find(anim_it->first); @@ -384,7 +385,7 @@ void LLControlAvatar::updateAnimations() } } } - if (!mPlaying && anims.size()>0) + if (!mPlaying) { mPlaying = true; if (!mRootVolp->isAnySelected()) diff --git a/indra/newview/llcontrolavatar.h b/indra/newview/llcontrolavatar.h index f45de25d81..02244769b9 100644 --- a/indra/newview/llcontrolavatar.h +++ b/indra/newview/llcontrolavatar.h @@ -82,4 +82,18 @@ public: }; +typedef std::map<LLUUID, S32> signaled_animation_map_t; +typedef std::map<LLUUID, signaled_animation_map_t> object_signaled_animation_map_t; + +// Stores information about previously requested animations, by object id. +class LLObjectSignaledAnimationMap: public LLSingleton<LLObjectSignaledAnimationMap> +{ + LLSINGLETON_EMPTY_CTOR(LLObjectSignaledAnimationMap); + +public: + object_signaled_animation_map_t mMap; + + object_signaled_animation_map_t& getMap() { return mMap; } +}; + #endif //LL_CONTROLAVATAR_H diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 05494b74f7..e8db01efed 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -5075,6 +5075,7 @@ void process_avatar_animation(LLMessageSystem *mesgsys, void **user_data) } } + // AXON make logging less spammy after issues resolved, before release. void process_object_animation(LLMessageSystem *mesgsys, void **user_data) { @@ -5085,6 +5086,19 @@ void process_object_animation(LLMessageSystem *mesgsys, void **user_data) mesgsys->getUUIDFast(_PREHASH_Sender, _PREHASH_ID, uuid); LL_INFOS("AnimatedObjects") << "Received animation state for object " << uuid << LL_ENDL; + + signaled_animation_map_t signaled_anims; + S32 num_blocks = mesgsys->getNumberOfBlocksFast(_PREHASH_AnimationList); + LL_INFOS("AnimatedObjects") << "processing object animation requests, num_blocks " << num_blocks << " uuid " << uuid << LL_ENDL; + 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); + signaled_anims[animation_id] = anim_sequence_id; + LL_INFOS("AnimatedObjects") << "added signaled_anims animation request for object " + << uuid << " animation id " << animation_id << LL_ENDL; + } + LLObjectSignaledAnimationMap::instance().getMap()[uuid] = signaled_anims; LLViewerObject *objp = gObjectList.findObject(uuid); if (!objp) @@ -5114,9 +5128,6 @@ void process_object_animation(LLMessageSystem *mesgsys, void **user_data) return; } - S32 num_blocks = mesgsys->getNumberOfBlocksFast(_PREHASH_AnimationList); - LL_INFOS("AnimatedObjects") << "processing object animation requests, num_blocks " << num_blocks << " uuid " << uuid << LL_ENDL; - if (!avatarp->mPlaying) { avatarp->mPlaying = true; @@ -5127,17 +5138,6 @@ void process_object_animation(LLMessageSystem *mesgsys, void **user_data) } } - volp->mObjectSignaledAnimations.clear(); - - 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); - volp->mObjectSignaledAnimations[animation_id] = anim_sequence_id; - LL_INFOS("AnimatedObjects") << "added object animation request for object " - << uuid << " animation id " << animation_id << LL_ENDL; - } - avatarp->updateAnimations(); } diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index 1cd50e3400..166fc04ad0 100644 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -3024,6 +3024,7 @@ void LLViewerObject::linkControlAvatar() cav->mRootVolp->recursiveMarkForUpdate(TRUE); } } + cav->updateAnimations(); } else { diff --git a/indra/newview/llvovolume.h b/indra/newview/llvovolume.h index 3ffb7c140a..952c94db0e 100644 --- a/indra/newview/llvovolume.h +++ b/indra/newview/llvovolume.h @@ -282,8 +282,6 @@ public: virtual void onReparent(LLViewerObject *old_parent, LLViewerObject *new_parent); virtual void afterReparent(); - std::map<LLUUID, S32> mObjectSignaledAnimations; // requested state of Animation name/value - // Functions that deal with media, or media navigation // Update this object's media data with the given media data array |