From 961656863a5e50e5f80e1e316811b884dd8a949f Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Mon, 14 Jun 2010 17:19:40 -0400 Subject: EXT-6571 WIP - fixes for handling of late arriving assets --- indra/newview/app_settings/settings.xml | 22 +++++++++++----------- indra/newview/llappearancemgr.cpp | 17 ++++++++++++----- 2 files changed, 23 insertions(+), 16 deletions(-) (limited to 'indra') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index f5e3656dc6..97d9e9f43a 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -3556,17 +3556,6 @@ Value 255 - MaxWearableWaitTime - - Comment - Max seconds to wait for wearable assets to fetch. - Persist - 1 - Type - F32 - Value - 60.0 - ForceShowGrid Comment @@ -4712,6 +4701,17 @@ Value 64.0 + MaxWearableWaitTime + + Comment + Max seconds to wait for wearable assets to fetch. + Persist + 1 + Type + F32 + Value + 60.0 + MeanCollisionBump Comment diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index a164cfeaa1..e54b9fe2ea 100644 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -265,6 +265,7 @@ public: void setGestItems(const LLInventoryModel::item_array_t& items); bool isValid(); void handleLateArrivals(); + void resetTime(F32 timeout); private: found_list_t mFoundList; @@ -351,8 +352,7 @@ bool LLWearableHoldingPattern::isFetchCompleted() bool LLWearableHoldingPattern::isTimedOut() { - F32 max_wait_time = gSavedSettings.getF32("MaxWearableWaitTime"); // give up if wearable fetches haven't completed in max_wait_time seconds. - return mWaitTime.getElapsedTimeF32() > max_wait_time; + return mWaitTime.hasExpired(); } void LLWearableHoldingPattern::checkMissingWearables() @@ -395,7 +395,7 @@ void LLWearableHoldingPattern::checkMissingWearables() } } - mWaitTime.reset(); + resetTime(60.0F); if (!pollMissingWearables()) { doOnIdleRepeating(boost::bind(&LLWearableHoldingPattern::pollMissingWearables,this)); @@ -722,7 +722,7 @@ void LLWearableHoldingPattern::handleLateArrivals() if (data.mWearable && data.mIsReplacement && replaced_types.find(data.mWearableType) != replaced_types.end()) { - LLAppearanceMgr::instance().removeCOFItemLinks(data.mItemID); + LLAppearanceMgr::instance().removeCOFItemLinks(data.mItemID,false); std::list::iterator clobber_ator = iter; ++iter; getFoundList().erase(clobber_ator); @@ -740,6 +740,12 @@ void LLWearableHoldingPattern::handleLateArrivals() LLAppearanceMgr::instance().updateAgentWearables(this, false); } +void LLWearableHoldingPattern::resetTime(F32 timeout) +{ + mWaitTime.reset(); + mWaitTime.setTimerExpirySec(timeout); +} + void LLWearableHoldingPattern::onWearableAssetFetch(LLWearable *wearable) { if (!isValid()) @@ -1522,7 +1528,7 @@ void LLAppearanceMgr::updateAppearanceFromCOF() linked_item->isWearableType() ? linked_item->getWearableType() : LLWearableType::WT_INVALID ); - if (skip_type != LLWearableType::WT_INVALID && found.mWearableType == skip_type) + if (skip_type != LLWearableType::WT_INVALID && skip_type == found.mWearableType) { found.mAssetID.generate(); // Replace with new UUID, guaranteed not to exist in DB } @@ -1558,6 +1564,7 @@ void LLAppearanceMgr::updateAppearanceFromCOF() } + holder->resetTime(gSavedSettings.getF32("MaxWearableWaitTime")); if (!holder->pollFetchCompletion()) { doOnIdleRepeating(boost::bind(&LLWearableHoldingPattern::pollFetchCompletion,holder)); -- cgit v1.2.3