auto-accept to rlv from own objects

meow-7.2.2
livie 2026-01-10 01:37:16 +02:00
parent 5bfe6f57ae
commit b769f3b83c
4 changed files with 35 additions and 6 deletions

View File

@ -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();

View File

@ -32,6 +32,7 @@
#include <map>
#include <vector>
#include <boost/signals2.hpp>
#include <cmath>
#include "llsd.h"
#include "llsdutil.h"

View File

@ -2,6 +2,17 @@
<llsd xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="llsd.xsd">
<map>
<key>FSMeowAutoAcceptRLVFromOwnObjects</key>
<map>
<key>Comment</key>
<string>Allows auto-accepting inventory offers to #RLV from own objects</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<string>1</string>
</map>
<key>FSTrishMouseLookFix</key>
<map>
<key>Comment</key>

View File

@ -224,6 +224,7 @@ void inventory_offer_handler(LLOfferInfo* info)
return;
}
static LLCachedControl<bool> fsMeowAutoAcceptRlvFromOwnObjects(gSavedSettings, "FSMeowAutoAcceptRLVFromOwnObjects");
bool bAutoAccept(false);
// Avoid the Accept/Discard dialog if the user so desires. JC
@ -236,14 +237,30 @@ void inventory_offer_handler(LLOfferInfo* info)
// </FS:Ansariel> 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]
{
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)
std::string msg = info->mDesc;