From a0157baf08ab5a4ac3f667520e18a796a11b9ad7 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Tue, 21 Sep 2021 17:01:57 +0100 Subject: SL-15999 - try to force non-interactive agents to always start out standing --- indra/newview/llviewermessage.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'indra/newview/llviewermessage.cpp') 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(); + } } -- cgit v1.2.3 From 628b9dfe0639a7dfccd05533671cbbf1d93d5ba0 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Mon, 27 Sep 2021 13:53:04 +0100 Subject: SL-15999 - removed kludgy run disablement, needs better fix --- indra/newview/llviewermessage.cpp | 16 ---------------- 1 file changed, 16 deletions(-) (limited to 'indra/newview/llviewermessage.cpp') diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index c99232eba0..39c891c9c1 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -4049,7 +4049,6 @@ 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; @@ -4065,14 +4064,6 @@ 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 @@ -4136,13 +4127,6 @@ 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(); - } } -- cgit v1.2.3 From 502d37913d3df8abb4e8e103c446e24ded2996a6 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Mon, 27 Sep 2021 21:23:49 +0100 Subject: SL-15999 - noninteractive: debugging run issues, suppress AFK/Away pose --- indra/newview/llviewermessage.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'indra/newview/llviewermessage.cpp') diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 39c891c9c1..ab65d747ba 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -4077,6 +4077,11 @@ void process_avatar_animation(LLMessageSystem *mesgsys, void **user_data) gAgent.setFlying(FALSE); } + if (gNonInteractive && animation_id == ANIM_AGENT_RUN) + { + LL_INFOS() << "Noninteractive, got run request for self" << LL_ENDL; + } + if (i < num_source_blocks) { mesgsys->getUUIDFast(_PREHASH_AnimationSourceList, _PREHASH_ObjectID, object_id, i); -- cgit v1.2.3 From 3c4198e4b50de0221020f3b5bbf7d3f7ff7cf984 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Wed, 29 Sep 2021 16:50:32 +0100 Subject: SL-15999 - noninteractive sessions should quit cleanly when they get a close message. Removed some possible crashes --- indra/newview/llviewermessage.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'indra/newview/llviewermessage.cpp') diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index ab65d747ba..517e35d482 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -2423,6 +2423,10 @@ void translateFailure(LLChat chat, LLSD toastArgs, int status, const std::string void process_chat_from_simulator(LLMessageSystem *msg, void **user_data) { + if (gNonInteractive) + { + return; + } LLChat chat; std::string mesg; std::string from_name; -- cgit v1.2.3