Ansariel 2024-08-23 11:42:58 +02:00
commit e27ceba982
5 changed files with 74 additions and 22 deletions

View File

@ -124,6 +124,9 @@ void calcAtmosphericVars(vec3 inPositionEye, vec3 light_dir, float ambFactor, ou
amblit = tmpAmbient;
additive *= vec3(1.0 - combined_haze);
// sanity clamp haze contribution
additive = min(additive, vec3(10));
}
vec3 srgb_to_linear(vec3 col);

View File

@ -1,4 +1,4 @@
version 58
version 59
// The version number above should be incremented IF AND ONLY IF some
// change has been made that is sufficiently important to justify
// resetting the graphics preferences of all users to the recommended

View File

@ -3672,6 +3672,11 @@ void LLFolderBridge::performAction(LLInventoryModel* model, std::string action)
// <FS:TT> Patch: ReplaceWornItemsOnly
else if ("replaceitems" == action)
{
//<FS:AR> FIRE-31508: check folder limit
if (modifyOutfitExceedsWearFolderLimit())
return;
//</FS:AR> FIRE-31508
LLInventoryModel* model = getInventoryModel();
if(!model) return;
LLViewerInventoryCategory* cat = getCategory();
@ -5363,32 +5368,68 @@ void LLFolderBridge::createWearable(LLFolderBridge* bridge, LLWearableType::ETyp
LLAgentWearables::createWearable(type, false, parent_id);
}
void LLFolderBridge::modifyOutfit(bool append)
//<FS:AR> FIRE-31508: refactored from void LLFolderBridge::modifyOutfit(bool append)
bool LLFolderBridge::modifyOutfitExceedsWearFolderLimit()
{
LLInventoryModel* model = getInventoryModel();
if(!model) return;
LLViewerInventoryCategory* cat = getCategory();
if(!cat) return;
LLViewerInventoryCategory *cat = getCategory();
if (!cat)
return false;
// checking amount of items to wear
U32 max_items = gSavedSettings.getU32("WearFolderLimit");
LLInventoryModel::cat_array_t cats;
U32 max_items = gSavedSettings.getU32("WearFolderLimit");
LLInventoryModel::cat_array_t cats;
LLInventoryModel::item_array_t items;
LLFindWearablesEx not_worn(/*is_worn=*/ false, /*include_body_parts=*/ false);
gInventory.collectDescendentsIf(cat->getUUID(),
cats,
items,
LLInventoryModel::EXCLUDE_TRASH,
not_worn);
LLFindWearablesEx not_worn(/*is_worn=*/false, /*include_body_parts=*/false);
gInventory.collectDescendentsIf(cat->getUUID(), cats, items, LLInventoryModel::EXCLUDE_TRASH, not_worn);
if (items.size() > max_items)
{
LLSD args;
args["AMOUNT"] = llformat("%d", max_items);
LLNotificationsUtil::add("TooManyWearables", args);
return;
return true;
}
return false;
}
//</FS:AR> FIRE-31508
void LLFolderBridge::modifyOutfit(bool append)
{
// <FS:AR> FIRE-31508: Commented out for slight efficiency.
// LLInventoryModel* model = getInventoryModel();
// if(!model) return;
// LLViewerInventoryCategory* cat = getCategory();
// if(!cat) return;
// <FS:AR/> FIRE-31508
//<FS:AR> FIRE-31508: refactored to bool modifyOutfitExceedsWearFolderLimit(), rather than duplicating code
//// checking amount of items to wear
//U32 max_items = gSavedSettings.getU32("WearFolderLimit");
//LLInventoryModel::cat_array_t cats;
//LLInventoryModel::item_array_t items;
//LLFindWearablesEx not_worn(/*is_worn=*/ false, /*include_body_parts=*/ false);
//gInventory.collectDescendentsIf(cat->getUUID(),
// cats,
// items,
// LLInventoryModel::EXCLUDE_TRASH,
// not_worn);
//if (items.size() > max_items)
//{
// LLSD args;
// args["AMOUNT"] = llformat("%d", max_items);
// LLNotificationsUtil::add("TooManyWearables", args);
// return;
//}
if (modifyOutfitExceedsWearFolderLimit())
return;
LLViewerInventoryCategory *cat = getCategory();
if (!cat)
return;
//</FS:AR> FIRE-31508
if (isAgentInventory())
{
LLAppearanceMgr::instance().wearInventoryCategory(cat, false, append);

View File

@ -389,6 +389,7 @@ protected:
bool checkFolderForContentsOfType(LLInventoryModel* model, LLInventoryCollectFunctor& typeToCheck);
bool modifyOutfitExceedsWearFolderLimit(); //<FS:AR> FIRE-31508
void modifyOutfit(bool append);
void copyOutfitToClipboard();
void determineFolderType();

View File

@ -548,13 +548,19 @@ void LLWebRTCVoiceClient::voiceConnectionCoro()
updatePosition();
}
}
sessionState::processSessionStates();
if (mProcessChannels && voiceEnabled && !mHidden)
{
sendPositionUpdate(false);
updateOwnVolume();
}
LL::WorkQueue::postMaybe(mMainQueue,
[=] {
if (sShuttingDown)
{
return;
}
sessionState::processSessionStates();
if (mProcessChannels && voiceEnabled && !mHidden)
{
sendPositionUpdate(false);
updateOwnVolume();
}
});
}
}
catch (const LLCoros::Stop&)
@ -2220,6 +2226,7 @@ void LLVoiceWebRTCConnection::OnIceCandidate(const llwebrtc::LLWebRTCIceCandidat
void LLVoiceWebRTCConnection::processIceUpdates()
{
mOutstandingRequests++;
LLCoros::getInstance()->launch("LLVoiceWebRTCConnection::processIceUpdatesCoro",
boost::bind(&LLVoiceWebRTCConnection::processIceUpdatesCoro, this->shared_from_this()));
}