diff options
Diffstat (limited to 'indra/newview/llworld.cpp')
-rw-r--r-- | indra/newview/llworld.cpp | 44 |
1 files changed, 36 insertions, 8 deletions
diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp index d7e5b464a6..f30567f481 100644 --- a/indra/newview/llworld.cpp +++ b/indra/newview/llworld.cpp @@ -45,6 +45,7 @@ #include "llhttpnode.h" #include "llregionhandle.h" #include "llsurface.h" +#include "lltrans.h" #include "llviewercamera.h" #include "llviewertexture.h" #include "llviewertexturelist.h" @@ -90,7 +91,8 @@ LLWorld::LLWorld() : mLastPacketsIn(0), mLastPacketsOut(0), mLastPacketsLost(0), - mSpaceTimeUSec(0) + mSpaceTimeUSec(0), + mClassicCloudsEnabled(TRUE) { for (S32 i = 0; i < 8; i++) { @@ -132,10 +134,11 @@ void LLWorld::destroyClass() LLViewerRegion* LLWorld::addRegion(const U64 ®ion_handle, const LLHost &host) { LLMemType mt(LLMemType::MTYPE_REGIONS); - + llinfos << "Add region with handle: " << region_handle << " on host " << host << llendl; LLViewerRegion *regionp = getRegionFromHandle(region_handle); if (regionp) { + llinfos << "Region exists, removing it " << llendl; LLHost old_host = regionp->getHost(); // region already exists! if (host == old_host && regionp->isAlive()) @@ -258,7 +261,7 @@ void LLWorld::removeRegion(const LLHost &host) llwarns << "gFrameTimeSeconds " << gFrameTimeSeconds << llendl; llwarns << "Disabling region " << regionp->getName() << " that agent is in!" << llendl; - LLAppViewer::instance()->forceDisconnect("You have been disconnected from the region you were in."); + LLAppViewer::instance()->forceDisconnect(LLTrans::getString("YouHaveBeenDisconnected")); return; } @@ -660,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) { @@ -1208,7 +1236,7 @@ static LLVector3d unpackLocalToGlobalPosition(U32 compact_local, const LLVector3 return pos_global; } -void LLWorld::getAvatars(std::vector<LLUUID>* avatar_ids, std::vector<LLVector3d>* positions, const LLVector3d& relative_to, F32 radius) const +void LLWorld::getAvatars(uuid_vec_t* avatar_ids, std::vector<LLVector3d>* positions, const LLVector3d& relative_to, F32 radius) const { if(avatar_ids != NULL) { |