diff options
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llscenemonitor.cpp | 9 | ||||
-rw-r--r-- | indra/newview/llviewerpartsim.cpp | 14 | ||||
-rw-r--r-- | indra/newview/llviewerpartsim.h | 2 |
3 files changed, 25 insertions, 0 deletions
diff --git a/indra/newview/llscenemonitor.cpp b/indra/newview/llscenemonitor.cpp index 8655aa4521..afb03ff268 100644 --- a/indra/newview/llscenemonitor.cpp +++ b/indra/newview/llscenemonitor.cpp @@ -39,6 +39,7 @@ #include "llspatialpartition.h" #include "llagent.h" #include "pipeline.h" +#include "llviewerpartsim.h" LLSceneMonitorView* gSceneMonitorView = NULL; @@ -273,8 +274,12 @@ void LLSceneMonitor::freezeScene() // freeze everything else gSavedSettings.setBOOL("FreezeTime", TRUE); + //disable sky, water and clouds gPipeline.clearRenderTypeMask(LLPipeline::RENDER_TYPE_SKY, LLPipeline::RENDER_TYPE_WL_SKY, LLPipeline::RENDER_TYPE_WATER, LLPipeline::RENDER_TYPE_CLOUDS, LLPipeline::END_RENDER_TYPES); + + //disable particle system + LLViewerPartSim::getInstance()->enable(false); } void LLSceneMonitor::unfreezeScene() @@ -285,8 +290,12 @@ void LLSceneMonitor::unfreezeScene() // thaw everything else gSavedSettings.setBOOL("FreezeTime", FALSE); + //enable sky, water and clouds gPipeline.setRenderTypeMask(LLPipeline::RENDER_TYPE_SKY, LLPipeline::RENDER_TYPE_WL_SKY, LLPipeline::RENDER_TYPE_WATER, LLPipeline::RENDER_TYPE_CLOUDS, LLPipeline::END_RENDER_TYPES); + + //enable particle system + LLViewerPartSim::getInstance()->enable(true); } void LLSceneMonitor::capture() 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() { diff --git a/indra/newview/llviewerpartsim.h b/indra/newview/llviewerpartsim.h index c91fcf0691..27bfcd4343 100644 --- a/indra/newview/llviewerpartsim.h +++ b/indra/newview/llviewerpartsim.h @@ -134,6 +134,8 @@ public: typedef std::vector<LLViewerPartGroup *> group_list_t; typedef std::vector<LLPointer<LLViewerPartSource> > source_list_t; + void enable(bool enabled); + void shift(const LLVector3 &offset); void updateSimulation(); |