summaryrefslogtreecommitdiff
path: root/indra/newview/llagentwearables.cpp
diff options
context:
space:
mode:
authorangela <angela@lindenlab.com>2010-02-23 11:44:56 +0800
committerangela <angela@lindenlab.com>2010-02-23 11:44:56 +0800
commite98d6a910a39671225f1af627570aee58517ea7f (patch)
tree9d0d28c80be1fd23166061e20bfce3d15a924e33 /indra/newview/llagentwearables.cpp
parent0eea585ef13426bf343fb5bcc3642cdfc769c022 (diff)
parent37291bea8d9b5a626b449d984856e280e159ac5c (diff)
merg and resolve conflicts
Diffstat (limited to 'indra/newview/llagentwearables.cpp')
-rw-r--r--indra/newview/llagentwearables.cpp31
1 files changed, 21 insertions, 10 deletions
diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp
index f4bc35002b..08cd101b01 100644
--- a/indra/newview/llagentwearables.cpp
+++ b/indra/newview/llagentwearables.cpp
@@ -286,6 +286,7 @@ void LLAgentWearables::addWearableToAgentInventoryCallback::fire(const LLUUID& i
}
if (mTodo & CALL_RECOVERDONE)
{
+ LLAppearanceManager::instance().addCOFItemLink(inv_item,false);
gAgentWearables.recoverMissingWearableDone();
}
/*
@@ -1038,7 +1039,7 @@ void LLAgentWearables::onInitialWearableAssetArrived(LLWearable* wearable, void*
{
return;
}
-
+
if (wearable)
{
llassert(type == wearable->getType());
@@ -1057,6 +1058,7 @@ void LLAgentWearables::onInitialWearableAssetArrived(LLWearable* wearable, void*
// Somehow the asset doesn't exist in the database.
gAgentWearables.recoverMissingWearable(type,index);
}
+
gInventory.notifyObservers();
@@ -1576,7 +1578,7 @@ void LLAgentWearables::setWearableOutfit(const LLInventoryItem::item_array_t& it
const LLDynamicArray< LLWearable* >& wearables,
BOOL remove)
{
- lldebugs << "setWearableOutfit() start" << llendl;
+ llinfos << "setWearableOutfit() start" << llendl;
BOOL wearables_to_remove[WT_COUNT];
wearables_to_remove[WT_SHAPE] = FALSE;
@@ -2485,7 +2487,7 @@ class LLFetchAndLinkObserver: public LLInventoryFetchObserver
public:
LLFetchAndLinkObserver(LLInventoryFetchObserver::item_ref_t& ids):
m_ids(ids),
- LLInventoryFetchObserver(true)
+ LLInventoryFetchObserver(true) // retry for missing items
{
}
~LLFetchAndLinkObserver()
@@ -2494,7 +2496,9 @@ public:
virtual void done()
{
gInventory.removeObserver(this);
+
// Link to all fetched items in COF.
+ LLPointer<LLInventoryCallback> link_waiter = new LLUpdateAppearanceOnDestroy;
for (LLInventoryFetchObserver::item_ref_t::iterator it = m_ids.begin();
it != m_ids.end();
++it)
@@ -2506,8 +2510,13 @@ public:
llwarns << "fetch failed!" << llendl;
continue;
}
- link_inventory_item(gAgent.getID(), item->getLinkedUUID(), LLAppearanceManager::instance().getCOF(), item->getName(),
- LLAssetType::AT_LINK, LLPointer<LLInventoryCallback>(NULL));
+
+ link_inventory_item(gAgent.getID(),
+ item->getLinkedUUID(),
+ LLAppearanceManager::instance().getCOF(),
+ item->getName(),
+ LLAssetType::AT_LINK,
+ link_waiter);
}
}
private:
@@ -2530,11 +2539,13 @@ void LLInitialWearablesFetch::processWearablesMessage()
#ifdef USE_CURRENT_OUTFIT_FOLDER
ids.push_back(wearable_data->mItemID);
#endif
- // Fetch the wearables
- LLWearableList::instance().getAsset(wearable_data->mAssetID,
- LLStringUtil::null,
- LLWearableDictionary::getAssetType(wearable_data->mType),
- LLAgentWearables::onInitialWearableAssetArrived, (void*)(wearable_data));
+#if 0
+// // Fetch the wearables
+// LLWearableList::instance().getAsset(wearable_data->mAssetID,
+// LLStringUtil::null,
+// LLWearableDictionary::getAssetType(wearable_data->mType),
+// LLAgentWearables::onInitialWearableAssetArrived, (void*)(wearable_data));
+#endif
}
else
{