diff options
author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2021-09-21 17:01:57 +0100 |
---|---|---|
committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2021-09-21 17:01:57 +0100 |
commit | a0157baf08ab5a4ac3f667520e18a796a11b9ad7 (patch) | |
tree | 56033bc90dbad0f6568c2c650afe1f3b6917a679 /indra | |
parent | 9bb566ea26c7fd5d93b5b42a9ee3f4aba92ebf7a (diff) |
SL-15999 - try to force non-interactive agents to always start out standing
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llappviewer.cpp | 1 | ||||
-rw-r--r-- | indra/newview/llviewermessage.cpp | 16 |
2 files changed, 17 insertions, 0 deletions
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index eab91f5d02..b6446e40ac 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -2440,6 +2440,7 @@ namespace } // anonymous namespace // Set a named control temporarily for this session, as when set via the command line --set option. +// Name can be specified as "<control_group>.<control_name>", with default group being Global. bool tempSetControl(const std::string& name, const std::string& value) { std::string name_part; diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 39c891c9c1..c99232eba0 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -4049,6 +4049,7 @@ void process_avatar_animation(LLMessageSystem *mesgsys, void **user_data) S32 num_blocks = mesgsys->getNumberOfBlocksFast(_PREHASH_AnimationList); S32 num_source_blocks = mesgsys->getNumberOfBlocksFast(_PREHASH_AnimationSourceList); + bool non_interactive_got_run = false; LL_DEBUGS("Messaging", "Motion") << "Processing " << num_blocks << " Animations" << LL_ENDL; @@ -4064,6 +4065,14 @@ void process_avatar_animation(LLMessageSystem *mesgsys, void **user_data) mesgsys->getUUIDFast(_PREHASH_AnimationList, _PREHASH_AnimID, animation_id, i); mesgsys->getS32Fast(_PREHASH_AnimationList, _PREHASH_AnimSequenceID, anim_sequence_id, i); + if (gNonInteractive && (animation_id == ANIM_AGENT_RUN)) + { + // RUN requests get sent at startup for unclear + // reasons. Same avatar may get requests one run and + // not another. At least in the non-interactive case, + // we want to override these. + non_interactive_got_run = true; + } avatarp->mSignaledAnimations[animation_id] = anim_sequence_id; // *HACK: Disabling flying mode if it has been enabled shortly before the agent @@ -4127,6 +4136,13 @@ void process_avatar_animation(LLMessageSystem *mesgsys, void **user_data) { avatarp->processAnimationStateChanges(); } + + if (non_interactive_got_run) + { + // Total kluge alert. + LL_INFOS("Messaging","Motion") << "non-interactive mode, resetting animations" << LL_ENDL; + gAgent.stopCurrentAnimations(); + } } |