summaryrefslogtreecommitdiff
path: root/indra/newview/llviewermenu.cpp
diff options
context:
space:
mode:
authorRider Linden <rider@lindenlab.com>2018-01-30 16:42:34 -0800
committerRider Linden <rider@lindenlab.com>2018-01-30 16:42:34 -0800
commit0bf50e2f8cfa5f3ccd6165ce935cf0fd9c174ced (patch)
tree4a161b5eaa5150775f13869d3d32ad5ae83d5904 /indra/newview/llviewermenu.cpp
parentfbd8a98300277bdbc1885c25eea290560fd8c6c1 (diff)
Cleanup on daycyle selection and stack. Move blenders into environment.
(Transition bronken, instant only. Shaddows moved based on region, not parcel)
Diffstat (limited to 'indra/newview/llviewermenu.cpp')
-rw-r--r--indra/newview/llviewermenu.cpp21
1 files changed, 13 insertions, 8 deletions
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index 647489666f..456c080f8a 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -8392,29 +8392,34 @@ class LLWorldEnvSettings : public view_listener_t
if (tod == "sunrise")
{
LLSettingsSky::ptr_t psky = LLEnvironment::instance().findSkyByName("Sunrise");
- LLEnvironment::instance().setSkyFor(LLEnvironment::ENV_LOCAL, psky);
+ LLEnvironment::instance().setEnvironment(LLEnvironment::ENV_LOCAL, psky);
+ LLEnvironment::instance().setSelectedEnvironment(LLEnvironment::ENV_LOCAL);
}
else if (tod == "noon")
{
LLSettingsSky::ptr_t psky = LLEnvironment::instance().findSkyByName("Midday");
- LLEnvironment::instance().setSkyFor(LLEnvironment::ENV_LOCAL, psky);
+ LLEnvironment::instance().setEnvironment(LLEnvironment::ENV_LOCAL, psky);
+ LLEnvironment::instance().setSelectedEnvironment(LLEnvironment::ENV_LOCAL);
}
else if (tod == "sunset")
{
LLSettingsSky::ptr_t psky = LLEnvironment::instance().findSkyByName("Sunset");
- LLEnvironment::instance().setSkyFor(LLEnvironment::ENV_LOCAL, psky);
+ LLEnvironment::instance().setEnvironment(LLEnvironment::ENV_LOCAL, psky);
+ LLEnvironment::instance().setSelectedEnvironment(LLEnvironment::ENV_LOCAL);
}
else if (tod == "midnight")
{
LLSettingsSky::ptr_t psky = LLEnvironment::instance().findSkyByName("Midnight");
- LLEnvironment::instance().setSkyFor(LLEnvironment::ENV_LOCAL, psky);
+ LLEnvironment::instance().setEnvironment(LLEnvironment::ENV_LOCAL, psky);
+ LLEnvironment::instance().setSelectedEnvironment(LLEnvironment::ENV_LOCAL);
}
else
{
- LLEnvironment::instance().clearUserSettings();
- }
+ LLEnvironment::instance().clearEnvironment(LLEnvironment::ENV_LOCAL);
+ LLEnvironment::instance().setSelectedEnvironment(LLEnvironment::ENV_LOCAL);
+ }
- LLEnvironment::instance().applyChosenEnvironment();
+ LLEnvironment::instance().updateEnvironment();
return true;
}
};
@@ -8426,7 +8431,7 @@ class LLWorldEnableEnvSettings : public view_listener_t
bool result = false;
std::string tod = userdata.asString();
- LLSettingsSky::ptr_t sky = LLEnvironment::instance().getSkyFor(LLEnvironment::ENV_LOCAL);
+ LLSettingsSky::ptr_t sky = LLEnvironment::instance().getEnvironmentFixedSky(LLEnvironment::ENV_LOCAL);
if (!sky)
{