From 0f02f6784d0bc2a9cf72674da0b7bf2262ca8b58 Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Wed, 25 May 2011 13:57:16 -0400 Subject: storm-1189: remove classic clouds --- indra/newview/llworld.cpp | 39 +++++++++------------------------------ 1 file changed, 9 insertions(+), 30 deletions(-) (limited to 'indra/newview/llworld.cpp') diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp index ec24b02934..3af62d537c 100644 --- a/indra/newview/llworld.cpp +++ b/indra/newview/llworld.cpp @@ -61,6 +61,8 @@ #include #include +#define TMP_WL_REMOVE_CLOUDS /* disables code for classic clouds */ + // // Globals // @@ -91,8 +93,11 @@ LLWorld::LLWorld() : mLastPacketsIn(0), mLastPacketsOut(0), mLastPacketsLost(0), - mSpaceTimeUSec(0), - mClassicCloudsEnabled(TRUE) + mSpaceTimeUSec(0) +#ifndef TMP_WL_REMOVE_CLOUDS + , + mClassicCloudsEnabled(FALSE) +#endif { for (S32 i = 0; i < 8; i++) { @@ -661,6 +666,7 @@ void LLWorld::updateParticles() LLViewerPartSim::getInstance()->updateSimulation(); } +#ifndef TMP_WL_REMOVE_CLOUDS void LLWorld::updateClouds(const F32 dt) { static LLFastTimer::DeclareTimer ftm("World Clouds"); @@ -672,33 +678,6 @@ void LLWorld::updateClouds(const F32 dt) 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()) { for (region_list_t::iterator iter = mActiveRegionList.begin(); @@ -745,7 +724,7 @@ LLCloudGroup* LLWorld::findCloudGroup(const LLCloudPuff &puff) } return NULL; } - +#endif // TMP_WL_REMOVE_CLOUDS void LLWorld::renderPropertyLines() { -- cgit v1.2.3 From fb9ef6233125d55d47104333d6b0062509850ff4 Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Thu, 26 May 2011 06:31:11 -0400 Subject: storm-1189: remove classic clouds --- indra/newview/llworld.cpp | 43 ++++++++++++------------------------------- 1 file changed, 12 insertions(+), 31 deletions(-) (limited to 'indra/newview/llworld.cpp') diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp index ec24b02934..596ab5931c 100644 --- a/indra/newview/llworld.cpp +++ b/indra/newview/llworld.cpp @@ -61,6 +61,8 @@ #include #include +#define TMP_WL_REMOVE_CLOUDS /* disables code for classic clouds */ + // // Globals // @@ -91,8 +93,11 @@ LLWorld::LLWorld() : mLastPacketsIn(0), mLastPacketsOut(0), mLastPacketsLost(0), - mSpaceTimeUSec(0), - mClassicCloudsEnabled(TRUE) + mSpaceTimeUSec(0) +#ifndef TMP_WL_REMOVE_CLOUDS + , + mClassicCloudsEnabled(FALSE) +#endif { for (S32 i = 0; i < 8; i++) { @@ -183,10 +188,12 @@ LLViewerRegion* LLWorld::addRegion(const U64 ®ion_handle, const LLHost &host) llerrs << "Unable to create new region!" << llendl; } +#ifndef TMP_WL_REMOVE_CLOUDS regionp->mCloudLayer.create(regionp); regionp->mCloudLayer.setWidth((F32)mWidth); regionp->mCloudLayer.setWindPointer(®ionp->mWind); - +#endif // TMP_WL_REMOVE_CLOUDS + mRegionList.push_back(regionp); mActiveRegionList.push_back(regionp); mCulledRegionList.push_back(regionp); @@ -661,6 +668,7 @@ void LLWorld::updateParticles() LLViewerPartSim::getInstance()->updateSimulation(); } +#ifndef TMP_WL_REMOVE_CLOUDS void LLWorld::updateClouds(const F32 dt) { static LLFastTimer::DeclareTimer ftm("World Clouds"); @@ -672,33 +680,6 @@ void LLWorld::updateClouds(const F32 dt) 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()) { for (region_list_t::iterator iter = mActiveRegionList.begin(); @@ -745,7 +726,7 @@ LLCloudGroup* LLWorld::findCloudGroup(const LLCloudPuff &puff) } return NULL; } - +#endif // TMP_WL_REMOVE_CLOUDS void LLWorld::renderPropertyLines() { -- cgit v1.2.3 From 0eb13bb6824d520fe66e85cba9168a94f4d27635 Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Thu, 26 May 2011 11:30:39 -0400 Subject: storm-1189: remove more of the code for classic clouds --- indra/newview/llworld.cpp | 70 ----------------------------------------------- 1 file changed, 70 deletions(-) (limited to 'indra/newview/llworld.cpp') diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp index 596ab5931c..c42d13db35 100644 --- a/indra/newview/llworld.cpp +++ b/indra/newview/llworld.cpp @@ -61,7 +61,6 @@ #include #include -#define TMP_WL_REMOVE_CLOUDS /* disables code for classic clouds */ // // Globals @@ -94,10 +93,6 @@ LLWorld::LLWorld() : mLastPacketsOut(0), mLastPacketsLost(0), mSpaceTimeUSec(0) -#ifndef TMP_WL_REMOVE_CLOUDS - , - mClassicCloudsEnabled(FALSE) -#endif { for (S32 i = 0; i < 8; i++) { @@ -188,12 +183,6 @@ LLViewerRegion* LLWorld::addRegion(const U64 ®ion_handle, const LLHost &host) llerrs << "Unable to create new region!" << llendl; } -#ifndef TMP_WL_REMOVE_CLOUDS - regionp->mCloudLayer.create(regionp); - regionp->mCloudLayer.setWidth((F32)mWidth); - regionp->mCloudLayer.setWindPointer(®ionp->mWind); -#endif // TMP_WL_REMOVE_CLOUDS - mRegionList.push_back(regionp); mActiveRegionList.push_back(regionp); mCulledRegionList.push_back(regionp); @@ -668,65 +657,6 @@ void LLWorld::updateParticles() LLViewerPartSim::getInstance()->updateSimulation(); } -#ifndef TMP_WL_REMOVE_CLOUDS -void LLWorld::updateClouds(const F32 dt) -{ - static LLFastTimer::DeclareTimer ftm("World Clouds"); - LLFastTimer t(ftm); - - if ( gSavedSettings.getBOOL("FreezeTime") ) - { - // don't move clouds in snapshot mode - return; - } - - if (mActiveRegionList.size()) - { - for (region_list_t::iterator iter = mActiveRegionList.begin(); - iter != mActiveRegionList.end(); ++iter) - { - LLViewerRegion* regionp = *iter; - regionp->mCloudLayer.updatePuffs(dt); - } - - // Reshuffle who owns which puffs - for (region_list_t::iterator iter = mActiveRegionList.begin(); - iter != mActiveRegionList.end(); ++iter) - { - LLViewerRegion* regionp = *iter; - regionp->mCloudLayer.updatePuffOwnership(); - } - - // Add new puffs - for (region_list_t::iterator iter = mActiveRegionList.begin(); - iter != mActiveRegionList.end(); ++iter) - { - LLViewerRegion* regionp = *iter; - regionp->mCloudLayer.updatePuffCount(); - } - } -} - -LLCloudGroup* LLWorld::findCloudGroup(const LLCloudPuff &puff) -{ - 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) - { - LLViewerRegion* regionp = *iter; - LLCloudGroup *groupp = regionp->mCloudLayer.findCloudGroup(puff); - if (groupp) - { - return groupp; - } - } - } - return NULL; -} -#endif // TMP_WL_REMOVE_CLOUDS void LLWorld::renderPropertyLines() { -- cgit v1.2.3 From 156e72fc19c7be33a7d8d04e5a630ecac6c8d5a6 Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Thu, 26 May 2011 21:40:16 -0400 Subject: correct merge errors --- indra/newview/llworld.cpp | 3 --- 1 file changed, 3 deletions(-) (limited to 'indra/newview/llworld.cpp') diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp index 00a1f90b1c..4a6ec7fdbb 100644 --- a/indra/newview/llworld.cpp +++ b/indra/newview/llworld.cpp @@ -61,7 +61,6 @@ #include #include -#define TMP_WL_REMOVE_CLOUDS /* disables code for classic clouds */ // // Globals @@ -658,8 +657,6 @@ void LLWorld::updateParticles() LLViewerPartSim::getInstance()->updateSimulation(); } -#ifndef TMP_WL_REMOVE_CLOUDS - void LLWorld::renderPropertyLines() { S32 region_count = 0; -- cgit v1.2.3