summaryrefslogtreecommitdiff
path: root/indra/newview/llappearancemgr.cpp
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2010-06-14 17:19:40 -0400
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2010-06-14 17:19:40 -0400
commit961656863a5e50e5f80e1e316811b884dd8a949f (patch)
tree026a2abd80c271cc3ba9037f6713b7b79727ee2e /indra/newview/llappearancemgr.cpp
parent8364708595a87e426bf348826698e674976b9e00 (diff)
EXT-6571 WIP - fixes for handling of late arriving assets
Diffstat (limited to 'indra/newview/llappearancemgr.cpp')
-rw-r--r--indra/newview/llappearancemgr.cpp17
1 files changed, 12 insertions, 5 deletions
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<LLFoundData>::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));