diff options
author | Graham Linden <graham@lindenlab.com> | 2018-06-01 15:34:21 +0100 |
---|---|---|
committer | Graham Linden <graham@lindenlab.com> | 2018-06-01 15:34:21 +0100 |
commit | 37e8fd20c3823482f3a15b4bfd544f7847070db8 (patch) | |
tree | b31e3a1ef86431cda7703621f779b38a98c14a3e /indra/llinventory/llsettingsbase.h | |
parent | 64302d3000b69b31e72eb6a3bd8a981c80cb88de (diff) | |
parent | bd84cbfa11fbe2b3aa5ceba5978841310488b8e4 (diff) |
Merge to 5.1.6
Diffstat (limited to 'indra/llinventory/llsettingsbase.h')
-rw-r--r-- | indra/llinventory/llsettingsbase.h | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/indra/llinventory/llsettingsbase.h b/indra/llinventory/llsettingsbase.h index 264c6c6c49..29ed50419a 100644 --- a/indra/llinventory/llsettingsbase.h +++ b/indra/llinventory/llsettingsbase.h @@ -274,7 +274,10 @@ public: mFinal(endsetting) { if (mInitial) - mTarget->replaceSettings(mInitial->getSettings()); + mTarget->replaceSettings(mInitial->getSettings()); + + if (!mFinal) + mFinal = mInitial; } virtual ~LLSettingsBlender() {} @@ -282,8 +285,15 @@ public: virtual void reset( LLSettingsBase::ptr_t &initsetting, const LLSettingsBase::ptr_t &endsetting, F64 /*span*/ = 1.0) { // note: the 'span' reset parameter is unused by the base class. + if (!mInitial) + LL_WARNS("BLENDER") << "Reseting blender with empty initial setting. Expect badness in the future." << LL_ENDL; + mInitial = initsetting; mFinal = endsetting; + + if (!mFinal) + mFinal = mInitial; + mTarget->replaceSettings(mInitial->getSettings()); } @@ -310,6 +320,8 @@ public: virtual void update(F64 blendf); virtual F64 setPosition(F64 blendf); + virtual void switchTrack(S32 trackno, F64 position = -1.0) { /*NoOp*/ } + protected: void triggerComplete(); @@ -351,6 +363,8 @@ public: virtual void update(F64 timedelta) override; protected: + F64 calculateBlend(F64 spanpos, F64 spanlen) const; + F64Seconds mBlendSpan; F64Seconds mLastUpdate; F64Seconds mTimeSpent; |