summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2017-11-08 20:38:26 +0000
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2017-11-08 20:38:26 +0000
commit625344a8e318b24b7d96a9bb9fa2da23166b991f (patch)
treeeff3086c3950c214aae74ec3feebd1f00037ca37
parentc7a0b25977a5ca30fc1726370f6363349ff9f836 (diff)
Added debug setting AnimatedObjectIgnoreLimits for server testing
-rw-r--r--indra/newview/app_settings/settings.xml11
-rw-r--r--indra/newview/llviewerobject.cpp18
-rw-r--r--indra/newview/llvoavatar.cpp18
3 files changed, 37 insertions, 10 deletions
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index e989733fc6..2fe01ab22f 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -2193,6 +2193,17 @@
<key>Value</key>
<integer>0</integer>
</map>
+ <key>AnimatedObjectsIgnoreLimits</key>
+ <map>
+ <key>Comment</key>
+ <string>Ignore server-enforced limits on animated objects. This is only useful for server testing.</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>0</integer>
+ </map>
<key>DebugAvatarAppearanceMessage</key>
<map>
<key>Comment</key>
diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp
index 404a771571..42f6b081e5 100644
--- a/indra/newview/llviewerobject.cpp
+++ b/indra/newview/llviewerobject.cpp
@@ -3607,13 +3607,21 @@ F32 LLViewerObject::recursiveGetEstTrianglesMax() const
S32 LLViewerObject::getAnimatedObjectMaxTris() const
{
S32 max_tris = 0;
- LLSD features;
- if (gAgent.getRegion())
+ // AXON remove after server testing done
+ if (gSavedSettings.getBOOL("AnimatedObjectsIgnoreLimits"))
{
- gAgent.getRegion()->getSimulatorFeatures(features);
- if (features.has("AnimatedObjects"))
+ max_tris = S32_MAX;
+ }
+ else
+ {
+ if (gAgent.getRegion())
{
- max_tris = features["AnimatedObjects"]["AnimatedObjectMaxTris"].asInteger();
+ LLSD features;
+ gAgent.getRegion()->getSimulatorFeatures(features);
+ if (features.has("AnimatedObjects"))
+ {
+ max_tris = features["AnimatedObjects"]["AnimatedObjectMaxTris"].asInteger();
+ }
}
}
return max_tris;
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index 1c4a6e4eb7..cdbe87de75 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -6675,13 +6675,21 @@ U32 LLVOAvatar::getNumAnimatedObjectAttachments() const
S32 LLVOAvatar::getMaxAnimatedObjectAttachments() const
{
S32 max_attach = 0;
- LLSD features;
- if (gAgent.getRegion())
+ // AXON remove after server testing done
+ if (gSavedSettings.getBOOL("AnimatedObjectsIgnoreLimits"))
{
- gAgent.getRegion()->getSimulatorFeatures(features);
- if (features.has("AnimatedObjects"))
+ max_attach = MAX_AGENT_ATTACHMENTS;
+ }
+ else
+ {
+ if (gAgent.getRegion())
{
- max_attach = features["AnimatedObjects"]["MaxAgentAnimatedObjectAttachments"].asInteger();
+ LLSD features;
+ gAgent.getRegion()->getSimulatorFeatures(features);
+ if (features.has("AnimatedObjects"))
+ {
+ max_attach = features["AnimatedObjects"]["MaxAgentAnimatedObjectAttachments"].asInteger();
+ }
}
}
return max_attach;