summaryrefslogtreecommitdiff
path: root/indra/newview/llenvironment.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llenvironment.cpp')
-rw-r--r--indra/newview/llenvironment.cpp30
1 files changed, 26 insertions, 4 deletions
diff --git a/indra/newview/llenvironment.cpp b/indra/newview/llenvironment.cpp
index 57e6ab7159..3373c8c3a4 100644
--- a/indra/newview/llenvironment.cpp
+++ b/indra/newview/llenvironment.cpp
@@ -811,7 +811,10 @@ LLEnvironment::LLEnvironment():
mSelectedWater(),
mSelectedDay(),
mSelectedEnvironment(LLEnvironment::ENV_LOCAL),
- mCurrentTrack(1)
+ mCurrentTrack(1),
+ mEditorCounter(0),
+ mShowSunBeacon(false),
+ mShowMoonBeacon(false)
{
}
@@ -2165,7 +2168,7 @@ LLEnvironment::EnvironmentInfo::ptr_t LLEnvironment::EnvironmentInfo::extractLeg
//=========================================================================
LLSettingsWater::ptr_t LLEnvironment::createWaterFromLegacyPreset(const std::string filename, LLSD &messages)
{
- std::string name(gDirUtilp->getBaseFileName(LLURI::unescape(filename), true));
+ std::string name(gDirUtilp->getBaseFileName(filename, true));
std::string path(gDirUtilp->getDirName(filename));
LLSettingsWater::ptr_t water = LLSettingsVOWater::buildFromLegacyPresetFile(name, path, messages);
@@ -2180,7 +2183,7 @@ LLSettingsWater::ptr_t LLEnvironment::createWaterFromLegacyPreset(const std::str
LLSettingsSky::ptr_t LLEnvironment::createSkyFromLegacyPreset(const std::string filename, LLSD &messages)
{
- std::string name(gDirUtilp->getBaseFileName(LLURI::unescape(filename), true));
+ std::string name(gDirUtilp->getBaseFileName(filename, true));
std::string path(gDirUtilp->getDirName(filename));
LLSettingsSky::ptr_t sky = LLSettingsVOSky::buildFromLegacyPresetFile(name, path, messages);
@@ -2194,7 +2197,7 @@ LLSettingsSky::ptr_t LLEnvironment::createSkyFromLegacyPreset(const std::string
LLSettingsDay::ptr_t LLEnvironment::createDayCycleFromLegacyPreset(const std::string filename, LLSD &messages)
{
- std::string name(gDirUtilp->getBaseFileName(LLURI::unescape(filename), true));
+ std::string name(gDirUtilp->getBaseFileName(filename, true));
std::string path(gDirUtilp->getDirName(filename));
LLSettingsDay::ptr_t day = LLSettingsVODay::buildFromLegacyPresetFile(name, path, messages);
@@ -2692,6 +2695,25 @@ void LLEnvironment::DayTransition::animate()
});
}
+void LLEnvironment::saveBeaconsState()
+{
+ if (mEditorCounter == 0)
+ {
+ mShowSunBeacon = gSavedSettings.getBOOL("sunbeacon");
+ mShowMoonBeacon = gSavedSettings.getBOOL("moonbeacon");
+ }
+ ++mEditorCounter;
+}
+void LLEnvironment::revertBeaconsState()
+{
+ --mEditorCounter;
+ if (mEditorCounter == 0)
+ {
+ gSavedSettings.setBOOL("sunbeacon", mShowSunBeacon && gSavedSettings.getBOOL("sunbeacon"));
+ gSavedSettings.setBOOL("moonbeacon", mShowMoonBeacon && gSavedSettings.getBOOL("moonbeacon"));
+ }
+}
+
//=========================================================================
LLTrackBlenderLoopingManual::LLTrackBlenderLoopingManual(const LLSettingsBase::ptr_t &target, const LLSettingsDay::ptr_t &day, S32 trackno) :
LLSettingsBlender(target, LLSettingsBase::ptr_t(), LLSettingsBase::ptr_t()),