diff options
author | Rider Linden <rider@lindenlab.com> | 2018-06-19 16:46:12 -0700 |
---|---|---|
committer | Rider Linden <rider@lindenlab.com> | 2018-06-19 16:46:12 -0700 |
commit | 1f9b8f59afceeb8201780b679659f64845dcd7c1 (patch) | |
tree | e2cb6d3d913c4de00c201c501ed22516d3205ebb /indra/llinventory | |
parent | 8b9ff4487bdc4becef270197f86c6f0bbfd324d1 (diff) |
Don't recalculate lighting every frame. Fix altitude transitions. On track switch ignore time threshold on blender.
Diffstat (limited to 'indra/llinventory')
-rw-r--r-- | indra/llinventory/llsettingsbase.cpp | 4 | ||||
-rw-r--r-- | indra/llinventory/llsettingsbase.h | 7 |
2 files changed, 9 insertions, 2 deletions
diff --git a/indra/llinventory/llsettingsbase.cpp b/indra/llinventory/llsettingsbase.cpp index 24e808c92a..db30a25a4c 100644 --- a/indra/llinventory/llsettingsbase.cpp +++ b/indra/llinventory/llsettingsbase.cpp @@ -610,10 +610,12 @@ void LLSettingsBlenderTimeDelta::applyTimeDelta(const LLSettingsBase::Seconds& t if (mTimeSpent > mBlendSpan) { + mIgnoreTimeDelta = false; triggerComplete(); return; } - if (mTimeDeltaPassed < mTimeDeltaThreshold) + + if ((mTimeDeltaPassed < mTimeDeltaThreshold) && (!mIgnoreTimeDelta)) { return; } diff --git a/indra/llinventory/llsettingsbase.h b/indra/llinventory/llsettingsbase.h index f2fa78e41f..81158d64a7 100644 --- a/indra/llinventory/llsettingsbase.h +++ b/indra/llinventory/llsettingsbase.h @@ -387,7 +387,8 @@ public: mLastUpdate(0.0f), mTimeSpent(0.0f), mTimeDeltaThreshold(0.0f), - mTimeDeltaPassed(0.0f) + mTimeDeltaPassed(0.0f), + mIgnoreTimeDelta(false) { mTimeStart = LLSettingsBase::Seconds(LLDate::now().secondsSinceEpoch()); mLastUpdate = mTimeStart; @@ -421,6 +422,9 @@ public: return mTimeDeltaThreshold; } + inline void setIgnoreTimeDeltaThreshold(bool val) { mIgnoreTimeDelta = val; } + inline bool getIgnoreTimeDeltaThreshold() const { return mIgnoreTimeDelta; } + protected: LLSettingsBase::BlendFactor calculateBlend(const LLSettingsBase::TrackPosition& spanpos, const LLSettingsBase::TrackPosition& spanlen) const; @@ -430,6 +434,7 @@ protected: LLSettingsBase::Seconds mTimeStart; LLSettingsBase::Seconds mTimeDeltaThreshold; LLSettingsBase::Seconds mTimeDeltaPassed; + bool mIgnoreTimeDelta; }; |