diff options
author | Xiaohong Bao <bao@lindenlab.com> | 2013-03-28 16:52:36 -0600 |
---|---|---|
committer | Xiaohong Bao <bao@lindenlab.com> | 2013-03-28 16:52:36 -0600 |
commit | 7a33d88886d9f9d83d3d12c95bb41e0093159d58 (patch) | |
tree | 9dcca0d65d54d178ab411b9b7357ef0a7cd4fca6 /indra/newview/llviewerpartsim.cpp | |
parent | 5334c15852b0669be74546d4fa11c58a279dda2d (diff) |
freeze particle system when monitor scene loading
Diffstat (limited to 'indra/newview/llviewerpartsim.cpp')
-rw-r--r-- | indra/newview/llviewerpartsim.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/indra/newview/llviewerpartsim.cpp b/indra/newview/llviewerpartsim.cpp index 8acdc08b00..a23a15da32 100644 --- a/indra/newview/llviewerpartsim.cpp +++ b/indra/newview/llviewerpartsim.cpp @@ -467,6 +467,20 @@ LLViewerPartSim::LLViewerPartSim() mID = ++id_seed; } +//enable/disable particle system +void LLViewerPartSim::enable(bool enabled) +{ + if(!enabled && sMaxParticleCount > 0) + { + sMaxParticleCount = 0; //disable + } + else if(enabled && sMaxParticleCount < 1) + { + sMaxParticleCount = llmin(gSavedSettings.getS32("RenderMaxPartCount"), LL_MAX_PARTICLE_COUNT); + } + + return; +} void LLViewerPartSim::destroyClass() { |