diff options
| author | Rider Linden <rider@lindenlab.com> | 2018-06-12 12:39:59 -0700 |
|---|---|---|
| committer | Rider Linden <rider@lindenlab.com> | 2018-06-12 12:39:59 -0700 |
| commit | 2add1e7abdf536b32bfbfa4b353189782df8cb19 (patch) | |
| tree | 35866e89acb21c13a6c14e078e6f45fc8d384126 /indra/llinventory/llsettingsbase.cpp | |
| parent | 0f608cb764856ae8586a9d9631842a782cb70a23 (diff) | |
Time threshold on timer based updates. Editor can replace frame with one from inventory. Extra check on adding a frame type.
Diffstat (limited to 'indra/llinventory/llsettingsbase.cpp')
| -rw-r--r-- | indra/llinventory/llsettingsbase.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/indra/llinventory/llsettingsbase.cpp b/indra/llinventory/llsettingsbase.cpp index 1b3b5d2576..f28d90cb62 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(): @@ -307,6 +308,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); @@ -335,6 +337,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'.") ); @@ -595,12 +604,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); |
