From 2ede35f1b67ad4e101f31e7329e53be10128d18c Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Tue, 1 Dec 2015 15:29:43 +0200 Subject: MAINT-5681 FIXED particles still render when complexity threshold is reached --- indra/newview/llviewerpartsim.cpp | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/indra/newview/llviewerpartsim.cpp b/indra/newview/llviewerpartsim.cpp index 230bdca4ef..ab510c1e95 100755 --- a/indra/newview/llviewerpartsim.cpp +++ b/indra/newview/llviewerpartsim.cpp @@ -39,6 +39,7 @@ #include "llworld.h" #include "pipeline.h" #include "llspatialpartition.h" +#include "llvoavatarself.h" #include "llvovolume.h" const F32 PART_SIM_BOX_SIDE = 16.f; @@ -703,16 +704,18 @@ void LLViewerPartSim::updateSimulation() if (!mViewerPartSources[i]->isDead()) { BOOL upd = TRUE; - if (!LLPipeline::sRenderAttachedParticles) + LLViewerObject* vobj = mViewerPartSources[i]->mSourceObjectp; + if (vobj && (vobj->getPCode() == LL_PCODE_VOLUME)) { - LLViewerObject* vobj = mViewerPartSources[i]->mSourceObjectp; - if (vobj && (vobj->getPCode() == LL_PCODE_VOLUME)) + if(vobj->getAvatar() && vobj->getAvatar()->isTooComplex()) { - LLVOVolume* vvo = (LLVOVolume *)vobj; - if (vvo && vvo->isAttachment()) - { - upd = FALSE; - } + upd = FALSE; + } + + LLVOVolume* vvo = (LLVOVolume *)vobj; + if (!LLPipeline::sRenderAttachedParticles && vvo && vvo->isAttachment()) + { + upd = FALSE; } } -- cgit v1.2.3