summaryrefslogtreecommitdiff
path: root/indra/llprimitive
diff options
context:
space:
mode:
authorruslantproductengine <ruslantproductengine@lindenlab.com>2017-01-24 15:56:25 +0200
committerruslantproductengine <ruslantproductengine@lindenlab.com>2017-01-24 15:56:25 +0200
commit6770c27321cf674af57c45ffee6faf09db788a6d (patch)
tree7fe838baabaea1da6cb188e9a7b933e527154cfb /indra/llprimitive
parent65161e6b393a6df6fa0a932aeb940fb7ac7ea084 (diff)
MAINT-6645 - Improvement - Agents that render as jelly dolls should have their attachments render at 0 LoD to prevent loading higher LoD complexity in memory thus deterring crashes.
Comments: - Fix based on "RenderAutoMuteByteLimit" setting. - File indra/llxml/llcontrol.h - add all signals to 0 group. It garanty that handlers (in indra/newview/llviewercontrol.cpp) will be called last.
Diffstat (limited to 'indra/llprimitive')
-rw-r--r--indra/llprimitive/llprimitive.cpp10
-rw-r--r--indra/llprimitive/llprimitive.h5
2 files changed, 15 insertions, 0 deletions
diff --git a/indra/llprimitive/llprimitive.cpp b/indra/llprimitive/llprimitive.cpp
index bfa65666b5..ee17ee5a91 100644
--- a/indra/llprimitive/llprimitive.cpp
+++ b/indra/llprimitive/llprimitive.cpp
@@ -732,6 +732,16 @@ S32 face_index_from_id(LLFaceID face_ID, const std::vector<LLProfile::Face>& fac
BOOL LLPrimitive::setVolume(const LLVolumeParams &volume_params, const S32 detail, bool unique_volume)
{
+ if (NO_LOD == detail)
+ {
+ // build the new object
+ setChanged(GEOMETRY);
+ sVolumeManager->unrefVolume(mVolumep);
+ mVolumep = new LLVolume(volume_params, 0, TRUE, TRUE);
+ setNumTEs(mVolumep->getNumFaces());
+ return FALSE;
+ }
+
LLVolume *volumep;
if (unique_volume)
{
diff --git a/indra/llprimitive/llprimitive.h b/indra/llprimitive/llprimitive.h
index 19d9d52817..99a32e614c 100644
--- a/indra/llprimitive/llprimitive.h
+++ b/indra/llprimitive/llprimitive.h
@@ -489,6 +489,11 @@ protected:
public:
static LLVolumeMgr* sVolumeManager;
+
+ enum
+ {
+ NO_LOD = -1
+ };
};
inline BOOL LLPrimitive::isAvatar() const