summaryrefslogtreecommitdiff
path: root/indra
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
parent8364708595a87e426bf348826698e674976b9e00 (diff)
EXT-6571 WIP - fixes for handling of late arriving assets
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/app_settings/settings.xml22
-rw-r--r--indra/newview/llappearancemgr.cpp17
2 files changed, 23 insertions, 16 deletions
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 @@
<key>Value</key>
<integer>255</integer>
</map>
- <key>MaxWearableWaitTime</key>
- <map>
- <key>Comment</key>
- <string>Max seconds to wait for wearable assets to fetch.</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>F32</string>
- <key>Value</key>
- <real>60.0</real>
- </map>
<key>ForceShowGrid</key>
<map>
<key>Comment</key>
@@ -4712,6 +4701,17 @@
<key>Value</key>
<real>64.0</real>
</map>
+ <key>MaxWearableWaitTime</key>
+ <map>
+ <key>Comment</key>
+ <string>Max seconds to wait for wearable assets to fetch.</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>F32</string>
+ <key>Value</key>
+ <real>60.0</real>
+ </map>
<key>MeanCollisionBump</key>
<map>
<key>Comment</key>
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));