summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorAnchor Linden <anchor@lindenlab.com>2018-07-19 22:46:03 +0530
committerAnchor Linden <anchor@lindenlab.com>2018-07-19 22:46:03 +0530
commit7318bd61f7a7ea89e471a6e0f3cc310786a3b41c (patch)
tree431aa003f9817b98c363eb570e2e70d8b3e7b290 /indra/newview
parent063d30e409d64d12a9ac3ca2d0328b55e49717f3 (diff)
[MAINT-8873] - check for bakesOnMesh enabled sim feature, before creating universal wearable type
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llagentwearables.cpp6
-rw-r--r--indra/newview/llviewerregion.cpp6
-rw-r--r--indra/newview/llviewerregion.h2
3 files changed, 14 insertions, 0 deletions
diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp
index 170e4063a1..15e4de8f69 100644
--- a/indra/newview/llagentwearables.cpp
+++ b/indra/newview/llagentwearables.cpp
@@ -1538,6 +1538,12 @@ void LLAgentWearables::createWearable(LLWearableType::EType type, bool wear, con
{
if (type == LLWearableType::WT_INVALID || type == LLWearableType::WT_NONE) return;
+ if (type == LLWearableType::WT_UNIVERSAL && !gAgent.getRegion()->bakesOnMeshEnabled())
+ {
+ LL_WARNS("Inventory") << "Can't create WT_UNIVERSAL type " << LL_ENDL;
+ return;
+ }
+
LLViewerWearable* wearable = LLWearableList::instance().createNewWearable(type, gAgentAvatarp);
LLAssetType::EType asset_type = wearable->getAssetType();
LLInventoryType::EType inv_type = LLInventoryType::IT_WEARABLE;
diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp
index feaafad2e1..98320247e0 100644
--- a/indra/newview/llviewerregion.cpp
+++ b/indra/newview/llviewerregion.cpp
@@ -3174,6 +3174,12 @@ bool LLViewerRegion::meshUploadEnabled() const
mSimulatorFeatures["MeshUploadEnabled"].asBoolean());
}
+bool LLViewerRegion::bakesOnMeshEnabled() const
+{
+ return (mSimulatorFeatures.has("BakesOnMeshEnabled") &&
+ mSimulatorFeatures["BakesOnMeshEnabled"].asBoolean());
+}
+
bool LLViewerRegion::meshRezEnabled() const
{
return (mSimulatorFeatures.has("MeshRezEnabled") &&
diff --git a/indra/newview/llviewerregion.h b/indra/newview/llviewerregion.h
index 302647215f..9405b02818 100644
--- a/indra/newview/llviewerregion.h
+++ b/indra/newview/llviewerregion.h
@@ -304,6 +304,8 @@ public:
bool meshRezEnabled() const;
bool meshUploadEnabled() const;
+ bool bakesOnMeshEnabled() const;
+
// has region received its simulator features list? Requires an additional query after caps received.
void setSimulatorFeaturesReceived(bool);
bool simulatorFeaturesReceived() const;