summaryrefslogtreecommitdiff
path: root/indra/llinventory/llsettingsbase.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llinventory/llsettingsbase.cpp')
-rw-r--r--indra/llinventory/llsettingsbase.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/indra/llinventory/llsettingsbase.cpp b/indra/llinventory/llsettingsbase.cpp
index a261c98bb1..24e808c92a 100644
--- a/indra/llinventory/llsettingsbase.cpp
+++ b/indra/llinventory/llsettingsbase.cpp
@@ -53,6 +53,7 @@ const std::string LLSettingsBase::SETTING_ID("id");
const std::string LLSettingsBase::SETTING_NAME("name");
const std::string LLSettingsBase::SETTING_HASH("hash");
const std::string LLSettingsBase::SETTING_TYPE("type");
+const std::string LLSettingsBase::SETTING_ASSETID("asset_id");
//=========================================================================
LLSettingsBase::LLSettingsBase():
@@ -309,6 +310,7 @@ LLSD LLSettingsBase::settingValidation(LLSD &settings, validation_list_t &valida
static Validator validateId(SETTING_ID, false, LLSD::TypeUUID);
static Validator validateHash(SETTING_HASH, false, LLSD::TypeInteger);
static Validator validateType(SETTING_TYPE, false, LLSD::TypeString);
+ static Validator validateAssetId(SETTING_ASSETID, false, LLSD::TypeUUID);
stringset_t validated;
stringset_t strip;
bool isValid(true);
@@ -337,6 +339,13 @@ LLSD LLSettingsBase::settingValidation(LLSD &settings, validation_list_t &valida
}
validated.insert(validateHash.getName());
+ if (!validateAssetId.verify(settings))
+ {
+ errors.append(LLSD::String("Invalid asset Id"));
+ isValid = false;
+ }
+ validated.insert(validateAssetId.getName());
+
if (!validateType.verify(settings))
{
errors.append( LLSD::String("Unable to validate 'type'.") );
@@ -597,12 +606,19 @@ LLSettingsBase::BlendFactor LLSettingsBlenderTimeDelta::calculateBlend(const LLS
void LLSettingsBlenderTimeDelta::applyTimeDelta(const LLSettingsBase::Seconds& timedelta)
{
mTimeSpent += timedelta;
+ mTimeDeltaPassed += timedelta;
if (mTimeSpent > mBlendSpan)
{
triggerComplete();
return;
}
+ if (mTimeDeltaPassed < mTimeDeltaThreshold)
+ {
+ return;
+ }
+
+ mTimeDeltaPassed = LLSettingsBase::Seconds(0.0);
LLSettingsBase::BlendFactor blendf = calculateBlend(mTimeSpent, mBlendSpan);