From 210f559efe81864c7581677882c867dc14b7f854 Mon Sep 17 00:00:00 2001 From: Darl Date: Fri, 25 Jul 2025 11:00:01 -0500 Subject: Media first click interact self check fix (#4406, #4426) --- indra/newview/lltoolpie.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'indra/newview/lltoolpie.cpp') diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp index 618955c83b..dc27e11a0b 100644 --- a/indra/newview/lltoolpie.cpp +++ b/indra/newview/lltoolpie.cpp @@ -1541,12 +1541,6 @@ bool LLToolPie::shouldAllowFirstMediaInteraction(const LLPickInfo& pick, bool mo return false; } - // Own objects - if((FirstClickPref & MEDIA_FIRST_CLICK_OWN) && object->permYouOwner()) - { - LL_DEBUGS_ONCE() << "FirstClickPref & MEDIA_FIRST_CLICK_OWN" << LL_ENDL; - return true; - } // HUD attachments if((FirstClickPref & MEDIA_FIRST_CLICK_HUD) && object->isHUDAttachment()) { @@ -1569,6 +1563,13 @@ bool LLToolPie::shouldAllowFirstMediaInteraction(const LLPickInfo& pick, bool mo return false; } + // Own objects + if((FirstClickPref & MEDIA_FIRST_CLICK_OWN) && owner_id == gAgent.getID()) + { + LL_DEBUGS_ONCE() << "FirstClickPref & MEDIA_FIRST_CLICK_OWN" << LL_ENDL; + return true; + } + // Check if the object is owned by a friend of the agent if(FirstClickPref & MEDIA_FIRST_CLICK_FRIEND) { -- cgit v1.2.3 From 4799f2e33865cf11b692dd95c594ae4d128d5866 Mon Sep 17 00:00:00 2001 From: Darl Date: Wed, 23 Jul 2025 19:03:15 -0500 Subject: Media first click interact group check fix --- indra/newview/lltoolpie.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'indra/newview/lltoolpie.cpp') diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp index dc27e11a0b..48c8470381 100644 --- a/indra/newview/lltoolpie.cpp +++ b/indra/newview/lltoolpie.cpp @@ -1580,11 +1580,9 @@ bool LLToolPie::shouldAllowFirstMediaInteraction(const LLPickInfo& pick, bool mo // Check for objects set to or owned by the active group if(FirstClickPref & MEDIA_FIRST_CLICK_GROUP) { - // Get our active group - LLUUID active_group = gAgent.getGroupID(); - if(active_group.notNull() && (active_group == group_id || active_group == owner_id)) + if(gAgent.isInGroup(group_id) || gAgent.isInGroup(owner_id)) { - LL_DEBUGS_ONCE() << "FirstClickPref & MEDIA_FIRST_CLICK_GROUP.Active group: " << active_group << ", group_id:" << group_id << ", owner_id: " << owner_id << LL_ENDL; + LL_DEBUGS_ONCE() << "FirstClickPref & MEDIA_FIRST_CLICK_GROUP. group_id:" << group_id << ", owner_id: " << owner_id << LL_ENDL; return true; } } -- cgit v1.2.3 From a588addc68e43c0558c5b18560f37fff350dc2f1 Mon Sep 17 00:00:00 2001 From: Darl Date: Wed, 23 Jul 2025 19:07:00 -0500 Subject: Media first click interact friend check fix --- indra/newview/lltoolpie.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'indra/newview/lltoolpie.cpp') diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp index 48c8470381..0fd9faab35 100644 --- a/indra/newview/lltoolpie.cpp +++ b/indra/newview/lltoolpie.cpp @@ -1573,8 +1573,11 @@ bool LLToolPie::shouldAllowFirstMediaInteraction(const LLPickInfo& pick, bool mo // Check if the object is owned by a friend of the agent if(FirstClickPref & MEDIA_FIRST_CLICK_FRIEND) { - LL_DEBUGS_ONCE() << "FirstClickPref & MEDIA_FIRST_CLICK_FRIEND. id: " << owner_id << LL_ENDL; - return LLAvatarTracker::instance().isBuddy(owner_id); + if(LLAvatarTracker::instance().isBuddy(owner_id)) + { + LL_DEBUGS_ONCE() << "FirstClickPref & MEDIA_FIRST_CLICK_FRIEND. id: " << owner_id << LL_ENDL; + return true; + } } // Check for objects set to or owned by the active group -- cgit v1.2.3