summaryrefslogtreecommitdiff
path: root/indra/newview/llenvironment.cpp
diff options
context:
space:
mode:
authorRider Linden <rider@lindenlab.com>2018-06-25 16:02:51 -0700
committerRider Linden <rider@lindenlab.com>2018-06-25 16:02:51 -0700
commit438d97714778ebb8728f0ac3808f0b8f98afc1fa (patch)
tree5c8e40bdf2584ee7a744fc79e27ca498e774a91e /indra/newview/llenvironment.cpp
parent7762829031236422dcb569017b7095424957c954 (diff)
Adding pause clouds to menu, and throttling expensive visual update on change.
Diffstat (limited to 'indra/newview/llenvironment.cpp')
-rw-r--r--indra/newview/llenvironment.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/indra/newview/llenvironment.cpp b/indra/newview/llenvironment.cpp
index 94605dc062..ee5eec59a3 100644
--- a/indra/newview/llenvironment.cpp
+++ b/indra/newview/llenvironment.cpp
@@ -66,6 +66,7 @@ namespace
LLTrace::BlockTimerStatHandle FTM_SHADER_PARAM_UPDATE("Update Shader Parameters");
LLSettingsBase::Seconds DEFAULT_UPDATE_THRESHOLD(10.0);
+ const LLSettingsBase::Seconds MINIMUM_SPANLENGTH(0.01f);
//---------------------------------------------------------------------
inline LLSettingsBase::TrackPosition get_wrapping_distance(LLSettingsBase::TrackPosition begin, LLSettingsBase::TrackPosition end)
@@ -221,7 +222,8 @@ namespace
LLSettingsBase::Seconds getSpanTime(const LLSettingsDay::TrackBound_t &bounds) const
{
LLSettingsBase::Seconds span = mCycleLength * get_wrapping_distance((*bounds.first).first, (*bounds.second).first);
- llassert(span > 0.01f);
+ if (span < MINIMUM_SPANLENGTH) // for very short spans set a minimum length.
+ span = MINIMUM_SPANLENGTH;
return span;
}