From b769f3b83c96ebd1480e1244e6e75e6f9029cb63 Mon Sep 17 00:00:00 2001 From: livie Date: Sat, 10 Jan 2026 01:37:16 +0200 Subject: [PATCH] auto-accept to rlv from own objects --- indra/llinventory/llsettingsbase.cpp | 2 +- indra/llinventory/llsettingsbase.h | 1 + indra/newview/app_settings/settings.xml | 11 ++++++++++ indra/newview/llimprocessing.cpp | 27 ++++++++++++++++++++----- 4 files changed, 35 insertions(+), 6 deletions(-) diff --git a/indra/llinventory/llsettingsbase.cpp b/indra/llinventory/llsettingsbase.cpp index 609a001ca7..db3711b087 100644 --- a/indra/llinventory/llsettingsbase.cpp +++ b/indra/llinventory/llsettingsbase.cpp @@ -764,7 +764,7 @@ void LLSettingsBlender::update(const LLSettingsBase::BlendFactor& blendf) F64 LLSettingsBlender::setBlendFactor(const LLSettingsBase::BlendFactor& blendf_in) { LLSettingsBase::TrackPosition blendf = (F32)blendf_in; - llassert(!isnan(blendf)); + llassert(!std::isnan(blendf)); if (blendf >= 1.0) { triggerComplete(); diff --git a/indra/llinventory/llsettingsbase.h b/indra/llinventory/llsettingsbase.h index bea6fdec97..33703d4745 100644 --- a/indra/llinventory/llsettingsbase.h +++ b/indra/llinventory/llsettingsbase.h @@ -32,6 +32,7 @@ #include #include #include +#include #include "llsd.h" #include "llsdutil.h" diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index fabd2dfbf0..bb2ed8789f 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -2,6 +2,17 @@ + FSMeowAutoAcceptRLVFromOwnObjects + + Comment + Allows auto-accepting inventory offers to #RLV from own objects + Persist + 1 + Type + Boolean + Value + 1 + FSTrishMouseLookFix Comment diff --git a/indra/newview/llimprocessing.cpp b/indra/newview/llimprocessing.cpp index 0eeb264de0..0dcd83167f 100644 --- a/indra/newview/llimprocessing.cpp +++ b/indra/newview/llimprocessing.cpp @@ -224,6 +224,7 @@ void inventory_offer_handler(LLOfferInfo* info) return; } + static LLCachedControl fsMeowAutoAcceptRlvFromOwnObjects(gSavedSettings, "FSMeowAutoAcceptRLVFromOwnObjects"); bool bAutoAccept(false); // Avoid the Accept/Discard dialog if the user so desires. JC @@ -236,13 +237,29 @@ void inventory_offer_handler(LLOfferInfo* info) // Auto-accept any kind of inventory (FIRE-4128) // [RLVa:KB] // Don't auto-accept give-to-RLV inventory offers - if ( (gSavedSettings.getBOOL("AutoAcceptNewInventory")) && - ( (!rlv_handler_t::isEnabled()) || (!RlvInventory::instance().isGiveToRLVOffer(*info)) ) ) + if ( (gSavedSettings.getBOOL("AutoAcceptNewInventory")) ) // [/RLVa:KB] { - // For certain types, just accept the items into the inventory, - // and possibly open them on receipt depending upon "ShowNewInventory". - bAutoAccept = true; + if (rlv_handler_t::isEnabled() && RlvInventory::instance().isGiveToRLVOffer(*info)) + { + if (info->mFromObject && info->mFromID == gAgentID && fsMeowAutoAcceptRlvFromOwnObjects && !RlvSettings::getForbidGiveToRLV()) + { + bAutoAccept = true; + + const LLUUID& idRlvRoot = RlvInventory::instance().getSharedRootID(); + if (idRlvRoot.notNull()) + info->mFolderID = idRlvRoot; + + RlvGiveToRLVTaskOffer* pOfferObserver = new RlvGiveToRLVTaskOffer(info->mTransactionID); + gInventory.addObserver(pOfferObserver); + } + } + else + { + // For certain types, just accept the items into the inventory, + // and possibly open them on receipt depending upon "ShowNewInventory". + bAutoAccept = true; + } } // Strip any SLURL from the message display. (DEV-2754)