summaryrefslogtreecommitdiff
path: root/indra/llinventory/llsettingsbase.cpp
diff options
context:
space:
mode:
authorRider Linden <rider@lindenlab.com>2018-07-11 16:46:14 -0700
committerRider Linden <rider@lindenlab.com>2018-07-11 16:46:14 -0700
commitca5d5be4fb51fa1ee7ffda24a0aa58c71facd7dd (patch)
tree12d3778f18c0fa2b1a2fea182abf3fa370f7fdab /indra/llinventory/llsettingsbase.cpp
parentd8ca452163256344aac51fed1f3141eb33fe5412 (diff)
Minor change from the simulator to throttle the minimum blend in a time based blend.
Diffstat (limited to 'indra/llinventory/llsettingsbase.cpp')
-rw-r--r--indra/llinventory/llsettingsbase.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/indra/llinventory/llsettingsbase.cpp b/indra/llinventory/llsettingsbase.cpp
index f282f0c7dc..8bcf8a4973 100644
--- a/indra/llinventory/llsettingsbase.cpp
+++ b/indra/llinventory/llsettingsbase.cpp
@@ -607,6 +607,8 @@ void LLSettingsBlender::triggerComplete()
}
//-------------------------------------------------------------------------
+const LLSettingsBase::BlendFactor LLSettingsBlenderTimeDelta::MIN_BLEND_DELTA(0.001);
+
LLSettingsBase::BlendFactor LLSettingsBlenderTimeDelta::calculateBlend(const LLSettingsBase::TrackPosition& spanpos, const LLSettingsBase::TrackPosition& spanlen) const
{
return LLSettingsBase::BlendFactor(fmod((F64)spanpos, (F64)spanlen) / (F64)spanlen);
@@ -629,9 +631,15 @@ void LLSettingsBlenderTimeDelta::applyTimeDelta(const LLSettingsBase::Seconds& t
return;
}
+ LLSettingsBase::BlendFactor blendf = calculateBlend(mTimeSpent, mBlendSpan);
mTimeDeltaPassed = LLSettingsBase::Seconds(0.0);
- LLSettingsBase::BlendFactor blendf = calculateBlend(mTimeSpent, mBlendSpan);
+ if (fabs(mLastBlendF - blendf) < mBlendFMinDelta)
+ {
+ return;
+ }
+
+ mLastBlendF = blendf;
update(blendf);
}