diff options
Diffstat (limited to 'indra/llinventory')
-rw-r--r-- | indra/llinventory/llsettingsbase.cpp | 4 | ||||
-rw-r--r-- | indra/llinventory/llsettingsbase.h | 7 | ||||
-rw-r--r-- | indra/llinventory/llsettingssky.cpp | 9 |
3 files changed, 15 insertions, 5 deletions
diff --git a/indra/llinventory/llsettingsbase.cpp b/indra/llinventory/llsettingsbase.cpp index fb4f5cdd60..7bcafabb8a 100644 --- a/indra/llinventory/llsettingsbase.cpp +++ b/indra/llinventory/llsettingsbase.cpp @@ -619,10 +619,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 3a5296daa4..7f88227a6d 100644 --- a/indra/llinventory/llsettingsbase.h +++ b/indra/llinventory/llsettingsbase.h @@ -388,7 +388,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; @@ -422,6 +423,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; @@ -431,6 +435,7 @@ protected: LLSettingsBase::Seconds mTimeStart; LLSettingsBase::Seconds mTimeDeltaThreshold; LLSettingsBase::Seconds mTimeDeltaPassed; + bool mIgnoreTimeDelta; }; diff --git a/indra/llinventory/llsettingssky.cpp b/indra/llinventory/llsettingssky.cpp index 3f2d55d79d..48ca79282e 100644 --- a/indra/llinventory/llsettingssky.cpp +++ b/indra/llinventory/llsettingssky.cpp @@ -35,9 +35,6 @@ //========================================================================= namespace { - LLTrace::BlockTimerStatHandle FTM_BLEND_SKYVALUES("Blending Sky Environment"); - LLTrace::BlockTimerStatHandle FTM_UPDATE_SKYVALUES("Update Sky Environment"); -} static const F32 NIGHTTIME_ELEVATION = -8.0f; // degrees static const F32 NIGHTTIME_ELEVATION_SIN = (F32)sinf(NIGHTTIME_ELEVATION * DEG_TO_RAD); @@ -51,6 +48,10 @@ static LLQuaternion convert_azimuth_and_altitude_to_quat(F32 azimuth, F32 altitu return quat; } +static LLTrace::BlockTimerStatHandle FTM_BLEND_SKYVALUES("Blending Sky Environment"); +static LLTrace::BlockTimerStatHandle FTM_RECALCULATE_SKYVALUES("Recalculate Sky"); +static LLTrace::BlockTimerStatHandle FTM_RECALCULATE_BODIES("Recalculate Heavenly Bodies"); +static LLTrace::BlockTimerStatHandle FTM_RECALCULATE_LIGHTING("Recalculate Lighting"); //========================================================================= const std::string LLSettingsSky::SETTING_AMBIENT("ambient"); @@ -790,6 +791,8 @@ LLSD LLSettingsSky::translateLegacySettings(const LLSD& legacy) void LLSettingsSky::updateSettings() { + LL_RECORD_BLOCK_TIME(FTM_RECALCULATE_SKYVALUES); + // base class clears dirty flag so as to not trigger recursive update LLSettingsBase::updateSettings(); |