summaryrefslogtreecommitdiff
path: root/indra/llinventory/llsettingsbase.cpp
diff options
context:
space:
mode:
authorGraham Linden <graham@lindenlab.com>2018-06-15 21:15:02 +0100
committerGraham Linden <graham@lindenlab.com>2018-06-15 21:15:02 +0100
commit66d78ce1c73d5da3bc5bc39fe0196a9f82040105 (patch)
tree169d7034712a765a1befc2c4154a5f3bdcb5e13a /indra/llinventory/llsettingsbase.cpp
parentc07775798e0adb134a2b5df8295bdb0ed7d374bc (diff)
Make water and sky defaults take a position value to allow for default daycycle w/ multiple frames.
Make default daycycle add 8 frames at 0, 0.125, 0.25 etc Merge over server-side bugfixes. Eliminate extraneous dirty bits in sky settings.
Diffstat (limited to 'indra/llinventory/llsettingsbase.cpp')
-rw-r--r--indra/llinventory/llsettingsbase.cpp19
1 files changed, 14 insertions, 5 deletions
diff --git a/indra/llinventory/llsettingsbase.cpp b/indra/llinventory/llsettingsbase.cpp
index 24e808c92a..fb4f5cdd60 100644
--- a/indra/llinventory/llsettingsbase.cpp
+++ b/indra/llinventory/llsettingsbase.cpp
@@ -580,10 +580,18 @@ F64 LLSettingsBlender::setBlendFactor(const LLSettingsBase::BlendFactor& blendf_
}
blendf = llclamp(blendf, 0.0f, 1.0f);
- mTarget->replaceSettings(mInitial->getSettings());
- if (!mFinal || (mInitial == mFinal) || (blendf == 0.0))
- { // this is a trivial blend. Results will be identical to the initial.
- return blendf;
+ if (mTarget)
+ {
+ mTarget->replaceSettings(mInitial->getSettings());
+ if (!mFinal || (mInitial == mFinal) || (blendf == 0.0))
+ { // this is a trivial blend. Results will be identical to the initial.
+ return blendf;
+ }
+ mTarget->blend(mFinal, blendf);
+ }
+ else
+ {
+ LL_WARNS("SETTINGS") << "No target for settings blender." << LL_ENDL;
}
mTarget->blend(mFinal, blendf);
@@ -592,7 +600,8 @@ F64 LLSettingsBlender::setBlendFactor(const LLSettingsBase::BlendFactor& blendf_
void LLSettingsBlender::triggerComplete()
{
- mTarget->replaceSettings(mFinal->getSettings());
+ if (mTarget)
+ mTarget->replaceSettings(mFinal->getSettings());
LLSettingsBlender::ptr_t hold = shared_from_this(); // prevents this from deleting too soon
mOnFinished(shared_from_this());
}