summaryrefslogtreecommitdiff
path: root/indra/llinventory/llsettingssky.cpp
diff options
context:
space:
mode:
authorGraham Linden <graham@lindenlab.com>2018-10-30 00:23:22 +0100
committerGraham Linden <graham@lindenlab.com>2018-10-30 00:23:22 +0100
commitf334453af1cb2e7085cbe72da4fee357afceb80f (patch)
tree666447d52ffa8fb7bc6db8a7e14995897e47d8b5 /indra/llinventory/llsettingssky.cpp
parent38a6f3b0dfd56ceb09bc5a689a678038f8022603 (diff)
parent2ee1f40411a9036c8d9d4d6cb6f9b75dead61315 (diff)
Merge
Diffstat (limited to 'indra/llinventory/llsettingssky.cpp')
-rw-r--r--indra/llinventory/llsettingssky.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/indra/llinventory/llsettingssky.cpp b/indra/llinventory/llsettingssky.cpp
index 8a1e74d7ea..cf6bc45080 100644
--- a/indra/llinventory/llsettingssky.cpp
+++ b/indra/llinventory/llsettingssky.cpp
@@ -438,7 +438,14 @@ void LLSettingsSky::blend(const LLSettingsBase::ptr_t &end, F64 blendf)
LLSettingsSky::ptr_t other = PTR_NAMESPACE::dynamic_pointer_cast<LLSettingsSky>(end);
if (other)
{
- LLSD blenddata = interpolateSDMap(mSettings, other->mSettings, blendf);
+ if (!mSettings.has(SETTING_LEGACY_HAZE) && !mSettings[SETTING_LEGACY_HAZE].has(SETTING_AMBIENT))
+ {
+ // Special case since SETTING_AMBIENT is both in outer and legacy maps, we prioritize legacy one
+ // see getAmbientColor()
+ setAmbientColor(getAmbientColor());
+ }
+
+ LLSD blenddata = interpolateSDMap(mSettings, other->mSettings, other->getParameterMap(), blendf);
replaceSettings(blenddata);
mNextSunTextureId = other->getSunTextureId();
mNextMoonTextureId = other->getMoonTextureId();
@@ -924,6 +931,7 @@ LLVector3 LLSettingsSky::getLightDirection() const
LLColor3 LLSettingsSky::getAmbientColor() const
{
+ // Todo: this causes complications, preferably to get rid of this duality
if (mSettings.has(SETTING_LEGACY_HAZE) && mSettings[SETTING_LEGACY_HAZE].has(SETTING_AMBIENT))
{
return LLColor3(mSettings[SETTING_LEGACY_HAZE][SETTING_AMBIENT]);