diff options
author | Rider Linden <rider@lindenlab.com> | 2018-06-28 17:06:49 -0700 |
---|---|---|
committer | Rider Linden <rider@lindenlab.com> | 2018-06-28 17:06:49 -0700 |
commit | 19069ce25c30f6744310e015dbf767954efbd8ae (patch) | |
tree | 99791a0d1345efa1faabc7aedcb3d96cab1e4202 /indra/newview/llviewermenu.cpp | |
parent | 1eda16b31989448a211808a8144f0a5ffb0bce49 (diff) |
Creating settings objects in the correct folders. Correctly check if clouds paused.
Diffstat (limited to 'indra/newview/llviewermenu.cpp')
-rw-r--r-- | indra/newview/llviewermenu.cpp | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 3688f6614f..e992cce26e 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -8445,6 +8445,11 @@ class LLWorldEnableEnvSettings : public view_listener_t bool result = false; std::string tod = userdata.asString(); + if (tod == "pauseclouds") + { + return LLEnvironment::instance().isCloudScrollPaused(); + } + LLSettingsSky::ptr_t sky = LLEnvironment::instance().getEnvironmentFixedSky(LLEnvironment::ENV_LOCAL); if (!sky) @@ -8453,31 +8458,28 @@ class LLWorldEnableEnvSettings : public view_listener_t } std::string skyname = (sky) ? sky->getName() : ""; + LLUUID skyid = (sky) ? sky->getAssetId() : LLUUID::null; if (tod == "sunrise") { - result = (skyname == "Sunrise"); + result = (skyid == LLEnvironment::KNOWN_SKY_SUNRISE); } else if (tod == "noon") { - result = (skyname == "Midday"); + result = (skyid == LLEnvironment::KNOWN_SKY_MIDDAY); } else if (tod == "sunset") { - result = (skyname == "Sunset"); + result = (skyid == LLEnvironment::KNOWN_SKY_SUNSET); } else if (tod == "midnight") { - result = (skyname == "Midnight"); + result = (skyid == LLEnvironment::KNOWN_SKY_MIDNIGHT); } else if (tod == "region") { return false; } - else if (tod == "pauseclouds") - { - return LLEnvironment::instance().isCloudScrollPaused(); - } else { LL_WARNS() << "Unknown time-of-day item: " << tod << LL_ENDL; |