aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/lightshare.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra/newview/lightshare.cpp')
-rw-r--r--linden/indra/newview/lightshare.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/linden/indra/newview/lightshare.cpp b/linden/indra/newview/lightshare.cpp
index 28b3d97..b422236 100644
--- a/linden/indra/newview/lightshare.cpp
+++ b/linden/indra/newview/lightshare.cpp
@@ -101,7 +101,7 @@ WindlightMessage::~WindlightMessage()
101// static 101// static
102void WindlightMessage::processWindlight(LLMessageSystem* msg, void**) 102void WindlightMessage::processWindlight(LLMessageSystem* msg, void**)
103{ 103{
104 if( !gSavedSettings.getBOOL("UseServersideWindlightSettings") ) 104 if( gSavedSettings.getU32("UseLightShare") <= LIGHTSHARE_NEVER )
105 return; 105 return;
106 106
107 WindlightMessage* wl = new WindlightMessage(msg); 107 WindlightMessage* wl = new WindlightMessage(msg);
@@ -112,9 +112,10 @@ void WindlightMessage::processWindlight(LLMessageSystem* msg, void**)
112 std::string water = LLWaterParamManager::instance()->mCurParams.mName; 112 std::string water = LLWaterParamManager::instance()->mCurParams.mName;
113 std::string sky = LLWLParamManager::instance()->mCurParams.mName; 113 std::string sky = LLWLParamManager::instance()->mCurParams.mName;
114 114
115 // If they are using region settings already, just apply the new 115 // If they are using region settings already, or LightShare is
116 // settings, don't bother asking. 116 // always allowed, just apply the new settings, don't bother asking.
117 if( sky == sSkyPresetName && water == sWaterPresetName ) 117 if( gSavedSettings.getU32("UseLightShare") == LIGHTSHARE_ALWAYS ||
118 (sky == sSkyPresetName && water == sWaterPresetName) )
118 { 119 {
119 wl->apply(); 120 wl->apply();
120 delete wl; 121 delete wl;
@@ -137,7 +138,8 @@ void WindlightMessage::processWindlight(LLMessageSystem* msg, void**)
137 return; 138 return;
138 } 139 }
139 140
140 if( sMostRecent == NULL ) 141 if( gSavedSettings.getU32("UseLightShare") == LIGHTSHARE_ASK &&
142 sMostRecent == NULL )
141 { 143 {
142 // No most recent, so store this and create notification 144 // No most recent, so store this and create notification
143 // asking the user whether to apply or not. 145 // asking the user whether to apply or not.