[FIXED] Prevent unchecking atmospheric shaders when @setenv restricted
parent
c204f194fb
commit
8be31d980e
|
|
@ -110,7 +110,6 @@
|
|||
#include "llweb.h"
|
||||
// [RLVa:KB] - Checked: 2010-03-18 (RLVa-1.2.0a)
|
||||
#include "rlvactions.h"
|
||||
#include "rlvhandler.h"
|
||||
// [/RLVa:KB]
|
||||
|
||||
#include "lllogininstance.h" // to check if logged in yet
|
||||
|
|
@ -1320,7 +1319,11 @@ void LLFloaterPreference::refreshEnabledState()
|
|||
}
|
||||
else
|
||||
{
|
||||
ctrl_wind_light->setEnabled(TRUE);
|
||||
// [RLVa:KB] - Checked: 2010-03-18 (RLVa-1.2.0a) | Modified: RLVa-0.2.0a
|
||||
// "Atmospheric Shaders" can't be disabled - but can be enabled - under @setenv=n
|
||||
ctrl_wind_light->setEnabled( (RlvActions::canChangeEnvironment()) || (!gSavedSettings.getBOOL("WindLightUseAtmosShaders")));
|
||||
// [/RLVa:KB]
|
||||
// ctrl_wind_light->setEnabled(TRUE);
|
||||
}
|
||||
|
||||
//Deferred/SSAO/Shadows
|
||||
|
|
@ -1347,7 +1350,7 @@ void LLFloaterPreferenceGraphicsAdvanced::refreshEnabledState()
|
|||
LLTextBox* reflections_text = getChild<LLTextBox>("ReflectionsText");
|
||||
|
||||
// [RLVa:KB] - Checked: 2013-05-11 (RLVa-1.4.9)
|
||||
if (rlv_handler_t::isEnabled())
|
||||
if (RlvActions::isRlvEnabled())
|
||||
{
|
||||
getChild<LLUICtrl>("do_not_disturb_response")->setEnabled(!RlvActions::hasBehaviour(RLV_BHVR_SENDIM));
|
||||
}
|
||||
|
|
@ -1399,13 +1402,11 @@ void LLFloaterPreferenceGraphicsAdvanced::refreshEnabledState()
|
|||
LLCheckBoxCtrl* ctrl_wind_light = getChild<LLCheckBoxCtrl>("WindLightUseAtmosShaders");
|
||||
LLSliderCtrl* sky = getChild<LLSliderCtrl>("SkyMeshDetail");
|
||||
LLTextBox* sky_text = getChild<LLTextBox>("SkyMeshDetailText");
|
||||
ctrl_wind_light->setEnabled(TRUE);
|
||||
// [RLVa:KB] - Checked: 2010-03-18 (RLVa-1.2.0a) | Modified: RLVa-0.2.0a
|
||||
// // "Atmospheric Shaders" can't be disabled - but can be enabled - under @setenv=n
|
||||
// bool fCtrlWindLightEnable = fCtrlShaderEnable && shaders;
|
||||
// ctrl_wind_light->setEnabled(
|
||||
// fCtrlWindLightEnable && ((!gRlvHandler.hasBehaviour(RLV_BHVR_SETENV)) || (!gSavedSettings.getBOOL("WindLightUseAtmosShaders"))) );
|
||||
// "Atmospheric Shaders" can't be disabled - but can be enabled - under @setenv=n
|
||||
ctrl_wind_light->setEnabled( (RlvActions::canChangeEnvironment()) || (!gSavedSettings.getBOOL("WindLightUseAtmosShaders")));
|
||||
// [/RLVa:KB]
|
||||
// ctrl_wind_light->setEnabled(TRUE);
|
||||
sky->setEnabled(TRUE);
|
||||
sky_text->setEnabled(TRUE);
|
||||
|
||||
|
|
|
|||
|
|
@ -76,6 +76,7 @@
|
|||
#include "llslurl.h"
|
||||
#include "llstartup.h"
|
||||
// [RLVa:KB] - Checked: 2015-12-27 (RLVa-1.5.0)
|
||||
#include "rlvactions.h"
|
||||
#include "rlvcommon.h"
|
||||
// [/RLVa:KB]
|
||||
|
||||
|
|
@ -142,6 +143,15 @@ static bool handleAvatarHoverOffsetChanged(const LLSD& newvalue)
|
|||
|
||||
static bool handleSetShaderChanged(const LLSD& newvalue)
|
||||
{
|
||||
// [RLVa:KB] - @setenv
|
||||
if ( (!RlvActions::canChangeEnvironment()) && (LLFeatureManager::getInstance()->isFeatureAvailable("WindLightUseAtmosShaders")) && (!gSavedSettings.getBOOL("WindLightUseAtmosShaders")) )
|
||||
{
|
||||
gSavedSettings.setBOOL("WindLightUseAtmosShaders", TRUE);
|
||||
return true;
|
||||
}
|
||||
// [/RLVa:KB]
|
||||
|
||||
|
||||
// changing shader level may invalidate existing cached bump maps, as the shader type determines the format of the bump map it expects - clear and repopulate the bump cache
|
||||
gBumpImageList.destroyGL();
|
||||
gBumpImageList.restoreGL();
|
||||
|
|
|
|||
Loading…
Reference in New Issue