From 1f9b8f59afceeb8201780b679659f64845dcd7c1 Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Tue, 19 Jun 2018 16:46:12 -0700 Subject: Don't recalculate lighting every frame. Fix altitude transitions. On track switch ignore time threshold on blender. --- indra/llinventory/llsettingsbase.cpp | 4 +++- indra/llinventory/llsettingsbase.h | 7 ++++++- 2 files changed, 9 insertions(+), 2 deletions(-) (limited to 'indra/llinventory') 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; }; -- cgit v1.2.3