summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreyL ProductEngine <alihatskiy@productengine.com>2019-04-26 21:02:00 +0300
committerAndreyL ProductEngine <alihatskiy@productengine.com>2019-04-26 21:02:00 +0300
commit5e5c5ca09c0add728f366ada48243b82f6aed38c (patch)
tree896b668529e2a54c647f014d8d3a70ef1418790b
parent59457cfcfe946223c2001fa9d9b66683b988315b (diff)
parenta44f03573d5d64102775922ff0e61f1bce2d1a22 (diff)
Merged SL-10400 and SL-10401
-rw-r--r--indra/llcommon/indra_constants.h1
-rw-r--r--indra/newview/llappviewer.cpp13
-rw-r--r--indra/newview/llcofwearables.cpp3
-rw-r--r--indra/newview/llinventorybridge.cpp2
-rw-r--r--indra/newview/llpanelpeople.cpp35
-rw-r--r--indra/newview/llvoavatar.cpp25
-rw-r--r--indra/newview/llvoavatar.h1
7 files changed, 69 insertions, 11 deletions
diff --git a/indra/llcommon/indra_constants.h b/indra/llcommon/indra_constants.h
index a00a82aff0..c0213d7c16 100644
--- a/indra/llcommon/indra_constants.h
+++ b/indra/llcommon/indra_constants.h
@@ -153,7 +153,6 @@ const U8 SIM_ACCESS_DOWN = 254;
const U8 SIM_ACCESS_MAX = SIM_ACCESS_ADULT;
// attachment constants
-const S32 MAX_AGENT_ATTACHMENTS = 38;
const U8 ATTACHMENT_ADD = 0x80;
// god levels
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 577082f01f..d6695e7f3e 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -1167,11 +1167,18 @@ bool LLAppViewer::init()
// ForceAddressSize
updater.args.add(stringize(gSavedSettings.getU32("ForceAddressSize")));
- // Run the updater. An exception from launching the updater should bother us.
- if (!beingDebugged())
+#if LL_WINDOWS && !LL_RELEASE_FOR_DOWNLOAD && !LL_SEND_CRASH_REPORTS
+ // This is neither a release package, nor crash-reporting enabled test build
+ // try to run version updater, but don't bother if it fails (file might be missing)
+ LLLeap *leap_p = LLLeap::create(updater, false);
+ if (!leap_p)
{
- LLLeap::create(updater, true);
+ LL_WARNS("LLLeap") << "Failed to run LLLeap" << LL_ENDL;
}
+#else
+ // Run the updater. An exception from launching the updater should bother us.
+ LLLeap::create(updater, true);
+#endif
// Iterate over --leap command-line options. But this is a bit tricky: if
// there's only one, it won't be an array at all.
diff --git a/indra/newview/llcofwearables.cpp b/indra/newview/llcofwearables.cpp
index 307f93e28c..b47e0930a3 100644
--- a/indra/newview/llcofwearables.cpp
+++ b/indra/newview/llcofwearables.cpp
@@ -42,6 +42,7 @@
#include "llwearableitemslist.h"
#include "llpaneloutfitedit.h"
#include "lltrans.h"
+#include "llvoavatarself.h"
static LLPanelInjector<LLCOFWearables> t_cof_wearables("cof_wearables");
@@ -330,7 +331,7 @@ void LLCOFWearables::setAttachmentsTitle()
{
if (mAttachmentsTab)
{
- U32 free_slots = MAX_AGENT_ATTACHMENTS - mAttachments->size();
+ U32 free_slots = gAgentAvatarp->getMaxAttachments() - mAttachments->size();
LLStringUtil::format_map_t args_attachments;
args_attachments["[COUNT]"] = llformat ("%d", free_slots);
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index 00b7732ee9..074b0c9c14 100644
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -6307,7 +6307,7 @@ bool confirm_attachment_rez(const LLSD& notification, const LLSD& response)
if (!gAgentAvatarp->canAttachMoreObjects())
{
LLSD args;
- args["MAX_ATTACHMENTS"] = llformat("%d", MAX_AGENT_ATTACHMENTS);
+ args["MAX_ATTACHMENTS"] = llformat("%d", gAgentAvatarp->getMaxAttachments());
LLNotificationsUtil::add("MaxAttachmentsOnOutfit", args);
return false;
}
diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp
index 1cbff37287..617ca05281 100644
--- a/indra/newview/llpanelpeople.cpp
+++ b/indra/newview/llpanelpeople.cpp
@@ -67,6 +67,7 @@
#include "llrecentpeople.h"
#include "llviewercontrol.h" // for gSavedSettings
#include "llviewermenu.h" // for gMenuHolder
+#include "llviewerregion.h"
#include "llvoiceclient.h"
#include "llworld.h"
#include "llspeakers.h"
@@ -613,12 +614,23 @@ void LLPanelPeople::removePicker()
BOOL LLPanelPeople::postBuild()
{
+ S32 max_premium = PREMIUM_MAX_AGENT_GROUPS;
+ if (gAgent.getRegion())
+ {
+ LLSD features;
+ gAgent.getRegion()->getSimulatorFeatures(features);
+ if (features.has("MaxAgentGroupsPremium"))
+ {
+ max_premium = features["MaxAgentGroupsPremium"].asInteger();
+ }
+ }
+
getChild<LLFilterEditor>("nearby_filter_input")->setCommitCallback(boost::bind(&LLPanelPeople::onFilterEdit, this, _2));
getChild<LLFilterEditor>("friends_filter_input")->setCommitCallback(boost::bind(&LLPanelPeople::onFilterEdit, this, _2));
getChild<LLFilterEditor>("groups_filter_input")->setCommitCallback(boost::bind(&LLPanelPeople::onFilterEdit, this, _2));
getChild<LLFilterEditor>("recent_filter_input")->setCommitCallback(boost::bind(&LLPanelPeople::onFilterEdit, this, _2));
- if(gMaxAgentGroups <= BASE_MAX_AGENT_GROUPS)
+ if(gMaxAgentGroups < max_premium)
{
getChild<LLTextBox>("groupcount")->setText(getString("GroupCountWithInfo"));
getChild<LLTextBox>("groupcount")->setURLClickedCallback(boost::bind(&LLPanelPeople::onGroupLimitInfo, this));
@@ -1165,8 +1177,25 @@ void LLPanelPeople::onFilterEdit(const std::string& search_string)
void LLPanelPeople::onGroupLimitInfo()
{
LLSD args;
- args["MAX_BASIC"] = BASE_MAX_AGENT_GROUPS;
- args["MAX_PREMIUM"] = PREMIUM_MAX_AGENT_GROUPS;
+
+ S32 max_basic = BASE_MAX_AGENT_GROUPS;
+ S32 max_premium = PREMIUM_MAX_AGENT_GROUPS;
+ if (gAgent.getRegion())
+ {
+ LLSD features;
+ gAgent.getRegion()->getSimulatorFeatures(features);
+ if (features.has("MaxAgentGroupsBasic"))
+ {
+ max_basic = features["MaxAgentGroupsBasic"].asInteger();
+ }
+ if (features.has("MaxAgentGroupsPremium"))
+ {
+ max_premium = features["MaxAgentGroupsPremium"].asInteger();
+ }
+ }
+ args["MAX_BASIC"] = max_basic;
+ args["MAX_PREMIUM"] = max_premium;
+
LLNotificationsUtil::add("GroupLimitInfo", args);
}
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index 2682c5b698..20fa327790 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -7037,12 +7037,33 @@ U32 LLVOAvatar::getNumAttachments() const
}
//-----------------------------------------------------------------------------
+// getMaxAttachments()
+//-----------------------------------------------------------------------------
+S32 LLVOAvatar::getMaxAttachments() const
+{
+ const S32 MAX_AGENT_ATTACHMENTS = 38;
+
+ S32 max_attach = MAX_AGENT_ATTACHMENTS;
+
+ if (gAgent.getRegion())
+ {
+ LLSD features;
+ gAgent.getRegion()->getSimulatorFeatures(features);
+ if (features.has("MaxAgentAttachments"))
+ {
+ max_attach = features["MaxAgentAttachments"].asInteger();
+ }
+ }
+ return max_attach;
+}
+
+//-----------------------------------------------------------------------------
// canAttachMoreObjects()
// Returns true if we can attach <n> more objects.
//-----------------------------------------------------------------------------
BOOL LLVOAvatar::canAttachMoreObjects(U32 n) const
{
- return (getNumAttachments() + n) <= MAX_AGENT_ATTACHMENTS;
+ return (getNumAttachments() + n) <= getMaxAttachments();
}
//-----------------------------------------------------------------------------
@@ -7070,7 +7091,7 @@ S32 LLVOAvatar::getMaxAnimatedObjectAttachments() const
S32 max_attach = 0;
if (gSavedSettings.getBOOL("AnimatedObjectsIgnoreLimits"))
{
- max_attach = MAX_AGENT_ATTACHMENTS;
+ max_attach = getMaxAttachments();
}
else
{
diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h
index a4f8e95c65..b603381e6d 100644
--- a/indra/newview/llvoavatar.h
+++ b/indra/newview/llvoavatar.h
@@ -811,6 +811,7 @@ public:
BOOL hasHUDAttachment() const;
LLBBox getHUDBBox() const;
void resetHUDAttachments();
+ S32 getMaxAttachments() const;
BOOL canAttachMoreObjects(U32 n=1) const;
S32 getMaxAnimatedObjectAttachments() const;
BOOL canAttachMoreAnimatedObjects(U32 n=1) const;