diff options
author | Jonathan Wolk <jwolk@lindenlab.com> | 2010-05-26 15:43:28 -0700 |
---|---|---|
committer | Jonathan Wolk <jwolk@lindenlab.com> | 2010-05-26 15:43:28 -0700 |
commit | f45f87e07df963f5d3629649f1416cd4a58dba89 (patch) | |
tree | 8a4b4164fc3276f4e1279d8f7ebb77eec25fd7bc /indra/newview/llworld.cpp | |
parent | 14b8471d448a6e591ab29d25634a32d882853212 (diff) |
Fixes for DEV-50619 Have the low graphics settings be the lowest possible settings for settings with slider bars and DEV-50618 Have Draw Classic Clouds be off for low graphics settings and DEV-50616 Toggling Draw Classic Clouds does not actually prevent them from being drawn if clouds have been drawn once. Reviewed by qarl
Diffstat (limited to 'indra/newview/llworld.cpp')
-rw-r--r-- | indra/newview/llworld.cpp | 36 |
1 files changed, 31 insertions, 5 deletions
diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp index 58b9f5ce18..f30567f481 100644 --- a/indra/newview/llworld.cpp +++ b/indra/newview/llworld.cpp @@ -91,7 +91,8 @@ LLWorld::LLWorld() : mLastPacketsIn(0), mLastPacketsOut(0), mLastPacketsLost(0), - mSpaceTimeUSec(0) + mSpaceTimeUSec(0), + mClassicCloudsEnabled(TRUE) { for (S32 i = 0; i < 8; i++) { @@ -662,16 +663,41 @@ void LLWorld::updateClouds(const F32 dt) static LLFastTimer::DeclareTimer ftm("World Clouds"); LLFastTimer t(ftm); - if (gSavedSettings.getBOOL("FreezeTime") || - !gSavedSettings.getBOOL("SkyUseClassicClouds")) + if ( gSavedSettings.getBOOL("FreezeTime") ) { // don't move clouds in snapshot mode return; } + + if ( + mClassicCloudsEnabled != + gSavedSettings.getBOOL("SkyUseClassicClouds") ) + { + // The classic cloud toggle has been flipped + // gotta update all of the cloud layers + mClassicCloudsEnabled = + gSavedSettings.getBOOL("SkyUseClassicClouds"); + + if ( !mClassicCloudsEnabled && mActiveRegionList.size() ) + { + // We've transitioned to having classic clouds disabled + // reset all cloud layers. + for ( + region_list_t::iterator iter = mActiveRegionList.begin(); + iter != mActiveRegionList.end(); + ++iter) + { + LLViewerRegion* regionp = *iter; + regionp->mCloudLayer.reset(); + } + + return; + } + } + else if ( !mClassicCloudsEnabled ) return; + if (mActiveRegionList.size()) { - // Update all the cloud puff positions, and timer based stuff - // such as death decay for (region_list_t::iterator iter = mActiveRegionList.begin(); iter != mActiveRegionList.end(); ++iter) { |