diff --git a/.hgpatchinfo/Appearance-Misc.dep b/.hgpatchinfo/Appearance-Misc.dep new file mode 100644 index 0000000000000000000000000000000000000000..870130fb778c52c5fe8407b6c0aa29c7188607bf --- /dev/null +++ b/.hgpatchinfo/Appearance-Misc.dep @@ -0,0 +1 @@ +e304a745887c1ed792051d440a16754310c9d09e \ No newline at end of file diff --git a/.hgpatchinfo/Appearance-Misc.desc b/.hgpatchinfo/Appearance-Misc.desc new file mode 100644 index 0000000000000000000000000000000000000000..fff24b744a44e912e7f506c722167d27b7eaacad --- /dev/null +++ b/.hgpatchinfo/Appearance-Misc.desc @@ -0,0 +1,13 @@ +[Appearance/Misc] +- fixed : LLAppearanceMgr::filterWearableItems() doesn't properly filter body parts +- fixed : LLWearableList::processGetAssetReply() creates multiple LLWearable instances for the same asset UUID + -> fix for http://jira.secondlife.com/browse/VWR-20608 +- changed : deprecated removeItemFromAvatar() in favour of having LLAppearanceMgr::removeItemFromAvatar() handle it directly/correctly + -> wearables can't be worn/removed in 2.X without the viewer already having an LLWearable instance for it anyway +- added : InitialWearablesLoadedSignal signal which is emitted *once* when the initial wearables are loaded +- fixed : attachments sometimes detach only to instantly get reattached after logon +- added : LegacyMultiAttachmentSupport debug setting to route "secondary attachment points" to the primary attachment point + -> maps secondary attachment point range [39,68] onto [1,30] + -> only dislays "secondary attachment points" correctly for *other* avatars (by design) +- fixed : Add to/Replace Outfit removes newly worn attachments on completion +- fixed : LLWearableBridge::removeAllClothesFromAvatar() doesn't remove all clothing from the avatar \ No newline at end of file diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 2a0e23b1dcf01437cb5c0801c42ad59ca990086f..ec8647f050c2adf17037f4ba441ad78081702111 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -4427,6 +4427,17 @@ <key>Value</key> <integer>0</integer> </map> + <key>LegacyMultiAttachmentSupport</key> + <map> + <key>Comment</key> + <string>Converts legacy "secondary attachment points" to multi-attachments for other avatars</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>0</integer> + </map> <key>LimitDragDistance</key> <map> <key>Comment</key> diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp index 055be4cae28a0a75e03a6e2cad1bde6c028bf308..7a7ec5dcc48ad6d68cbee27ea32d2c55814946df 100644 --- a/indra/newview/llagentwearables.cpp +++ b/indra/newview/llagentwearables.cpp @@ -55,6 +55,9 @@ LLAgentWearables gAgentWearables; BOOL LLAgentWearables::mInitialWearablesUpdateReceived = FALSE; +// [SL:KB] - Patch: Appearance-InitialWearablesLoadedCallback | Checked: 2010-08-14 (Catznip-2.1.2a) | Added: Catznip-2.1.1d +bool LLAgentWearables::mInitialWearablesLoaded = false; +// [/SL:KB] using namespace LLVOAvatarDefines; @@ -2100,9 +2103,23 @@ boost::signals2::connection LLAgentWearables::addLoadedCallback(loaded_callback_ return mLoadedSignal.connect(cb); } +// [SL:KB] - Patch: Appearance-InitialWearablesLoadedCallback | Checked: 2010-08-14 (Catznip-2.1.2a) | Added: Catznip-2.1.1d +boost::signals2::connection LLAgentWearables::addInitialWearablesLoadedCallback(loaded_callback_t cb) +{ + return mInitialWearablesLoadedSignal.connect(cb); +} +// [/SL:KB] + void LLAgentWearables::notifyLoadingStarted() { mCOFChangeInProgress = true; +// [SL:KB] - Patch: Appearance-InitialWearablesLoadedCallback | Checked: 2010-08-14 (Catznip-2.1.2a) | Added: Catznip-2.1.1d + if (!mInitialWearablesLoaded) + { + mInitialWearablesLoaded = true; + mInitialWearablesLoadedSignal(); + } +// [/SL:KB] mLoadingStartedSignal(); } diff --git a/indra/newview/llagentwearables.h b/indra/newview/llagentwearables.h index d7e77a5a5bd9a323e53a6fb8fbbd0941d42ed0af..45829f2b660b06f8a86a716745dafbf27d6e3696 100644 --- a/indra/newview/llagentwearables.h +++ b/indra/newview/llagentwearables.h @@ -76,6 +76,9 @@ public: BOOL isWearableCopyable(LLWearableType::EType type, U32 index /*= 0*/) const; BOOL areWearablesLoaded() const; +// [SL:KB] - Patch: Appearance-InitialWearablesLoadedCallback | Checked: 2010-08-14 (Catznip-2.1.2a) | Added: Catznip-2.1.1d + bool areInitalWearablesLoaded() const { return mInitialWearablesLoaded; } +// [/SL:KB] bool isCOFChangeInProgress() const { return mCOFChangeInProgress; } void updateWearablesLoaded(); void checkWearablesLoaded() const; @@ -234,6 +237,9 @@ public: typedef boost::function<void()> loaded_callback_t; typedef boost::signals2::signal<void()> loaded_signal_t; boost::signals2::connection addLoadedCallback(loaded_callback_t cb); +// [SL:KB] - Patch: Appearance-InitialWearablesLoadedCallback | Checked: 2010-08-14 (Catznip-2.1.2a) | Added: Catznip-2.1.1d + boost::signals2::connection addInitialWearablesLoadedCallback(loaded_callback_t cb); +// [/SL:KB] void notifyLoadingStarted(); void notifyLoadingFinished(); @@ -241,6 +247,9 @@ public: private: loading_started_signal_t mLoadingStartedSignal; // should be called before wearables are changed loaded_signal_t mLoadedSignal; // emitted when all agent wearables get loaded +// [SL:KB] - Patch: Appearance-InitialWearablesLoadedCallback | Checked: 2010-08-14 (Catznip-2.1.2a) | Added: Catznip-2.1.1d + loaded_signal_t mInitialWearablesLoadedSignal; // emitted once when the initial wearables are loaded +// [/SL:KB] //-------------------------------------------------------------------- // Member variables @@ -251,6 +260,9 @@ private: wearableentry_map_t mWearableDatas; static BOOL mInitialWearablesUpdateReceived; +// [SL:KB] - Patch: Appearance-InitialWearablesLoadedCallback | Checked: 2010-08-14 (Catznip-2.1.2a) | Added: Catznip-2.1.1d + static bool mInitialWearablesLoaded; +// [/SL:KB] BOOL mWearablesLoaded; std::set<LLUUID> mItemsAwaitingWearableUpdate; diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index ed5e8ceee33af72f99e9b82aef171bfb919d730b..b7687a29f4e900345cfac16d660a62ac187676f7 100644 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -292,8 +292,13 @@ public: private: found_list_t mFoundList; +// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-03-22 (Catznip-2.1.2a) | Added: Catznip-2.1.2a + // Fix for http://jira.secondlife.com/browse/VWR-18512 +/* LLInventoryModel::item_array_t mObjItems; LLInventoryModel::item_array_t mGestItems; +*/ +// [/SL:KB] typedef std::set<S32> type_set_t; type_set_t mTypesToRecover; type_set_t mTypesToLink; @@ -358,6 +363,9 @@ void LLWearableHoldingPattern::eraseTypeToRecover(LLWearableType::EType type) mTypesToRecover.erase(type); } +// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-06-19 (Catznip-2.1.2a) | Added: Catznip-2.1.2a +// Fix for http://jira.secondlife.com/browse/VWR-18512 +/* void LLWearableHoldingPattern::setObjItems(const LLInventoryModel::item_array_t& items) { mObjItems = items; @@ -367,6 +375,8 @@ void LLWearableHoldingPattern::setGestItems(const LLInventoryModel::item_array_t { mGestItems = items; } +*/ +// [/SL:KB] bool LLWearableHoldingPattern::isFetchCompleted() { @@ -436,6 +446,9 @@ void LLWearableHoldingPattern::onAllComplete() } // Activate all gestures in this folder +// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-03-22 (Catznip-2.1.2a) | Added: Catznip-2.1.2a + // Fix for http://jira.secondlife.com/browse/VWR-18512 +/* if (mGestItems.count() > 0) { llinfos << "Activating " << mGestItems.count() << " gestures" << llendl; @@ -453,17 +466,28 @@ void LLWearableHoldingPattern::onAllComplete() gInventory.notifyObservers(); } } +*/ +// [/SL:KB] // Update wearables. llinfos << "Updating agent wearables with " << mResolved << " wearable items " << llendl; LLAppearanceMgr::instance().updateAgentWearables(this, false); +// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-03-22 (Catznip-2.1.2a) | Added: Catznip-2.1.2a + // Fix for http://jira.secondlife.com/browse/VWR-18512 +/* // Update attachments to match those requested. - if (isAgentAvatarValid()) +// if (isAgentAvatarValid()) +// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-08-14 (Catznip-2.1.2a) | Modified: Catznip-2.1.1d + // Don't update attachments until initial wearables have loaded (should reduce random attaching/detaching/reattaching at log-on) + if ( (isAgentAvatarValid()) && (gAgentWearables.areInitalWearablesLoaded()) ) +// [/SL:KB] { llinfos << "Updating " << mObjItems.count() << " attachments" << llendl; LLAgentWearables::userUpdateAttachments(mObjItems); } +*/ +// [/SL:KB] if (isFetchCompleted() && isMissingCompleted()) { @@ -1360,7 +1384,11 @@ void LLAppearanceMgr::filterWearableItems( S32 size = items_by_type[i].size(); if (size <= 0) continue; - S32 start_index = llmax(0,size-max_per_type); +// S32 start_index = llmax(0,size-max_per_type); +// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-05-11 (Catznip-2.1.2a) | Added: Catznip-2.0.0h + S32 start_index = + llmax(0, size - ((LLAssetType::AT_BODYPART == LLWearableType::getAssetType((LLWearableType::EType)i)) ? 1 : max_per_type)); +// [/SL:KB[ for (S32 j = start_index; j<size; j++) { items.push_back(items_by_type[i][j]); @@ -1689,6 +1717,29 @@ void LLAppearanceMgr::updateAppearanceFromCOF(bool update_base_outfit_ordering) remove_non_link_items(obj_items); remove_non_link_items(gest_items); +// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-08-31 (Catznip-2.1.2a) | Added: Catznip-2.1.2a + // Include attachments which should be in COF but don't have their link created yet + if (isAgentAvatarValid()) + { + uuid_vec_t::iterator itPendingObjLink = mPendingObjLinks.begin(); + while (itPendingObjLink != mPendingObjLinks.end()) + { + const LLUUID& idItem = *itPendingObjLink; + if (!gAgentAvatarp->isWearingAttachment(idItem)) + { + itPendingObjLink = mPendingObjLinks.erase(itPendingObjLink); + continue; + } + + LLViewerInventoryItem* pItem = gInventory.getItem(idItem); + if (pItem) + obj_items.push_back(pItem); + + ++itPendingObjLink; + } + } +// [/SL:KB] + dumpItemArray(wear_items,"asset_dump: wear_item"); dumpItemArray(obj_items,"asset_dump: obj_item"); @@ -1701,11 +1752,49 @@ void LLAppearanceMgr::updateAppearanceFromCOF(bool update_base_outfit_ordering) //preparing the list of wearables in the correct order for LLAgentWearables sortItemsByActualDescription(wear_items); +// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-03-22 (Catznip-2.1.2a) | Added: Catznip-2.1.2a + // Fix for http://jira.secondlife.com/browse/VWR-18512 [code below copied from LLWearableHoldingPattern::pollCompletion()] + + // Activate all gestures in this folder + if (gest_items.count() > 0) + { + llinfos << "Activating " << gest_items.count() << " gestures" << llendl; + + LLGestureMgr::instance().activateGestures(gest_items); + + // Update the inventory item labels to reflect the fact + // they are active. + LLViewerInventoryCategory* catp = + gInventory.getCategory(LLAppearanceMgr::instance().getCOF()); + + if (catp) + { + gInventory.updateCategory(catp); + gInventory.notifyObservers(); + } + } + + // Update attachments to match those requested. +// if (isAgentAvatarValid()) +// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-08-14 (Catznip-2.1.2a) | Modified: Catznip-2.1.1d + // Don't update attachments until initial wearables have loaded (should reduce random attaching/detaching/reattaching at log-on) + if ( (isAgentAvatarValid()) && (gAgentWearables.areInitalWearablesLoaded()) ) +// [/SL:KB] + { + llinfos << "Updating " << obj_items.count() << " attachments" << llendl; + LLAgentWearables::userUpdateAttachments(obj_items); + } +// [/SL:KB] LLWearableHoldingPattern* holder = new LLWearableHoldingPattern; +// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-03-22 (Catznip-2.1.2a) | Added: Catznip-2.1.2a + // Fix for http://jira.secondlife.com/browse/VWR-18512 +/* holder->setObjItems(obj_items); holder->setGestItems(gest_items); +*/ +// [/SL:KB] // Note: can't do normal iteration, because if all the // wearables can be resolved immediately, then the @@ -2508,11 +2597,27 @@ void LLAppearanceMgr::removeItemFromAvatar(const LLUUID& id_to_remove) switch (item_to_remove->getType()) { case LLAssetType::AT_CLOTHING: - if (get_is_item_worn(id_to_remove)) +// if (get_is_item_worn(id_to_remove)) +// { +// //*TODO move here the exact removing code from LLWearableBridge::removeItemFromAvatar in the future +// LLWearableBridge::removeItemFromAvatar(item_to_remove); +// } +// [SL:KB] - Patch: Appearance-RemoveWearableFromAvatar | Checked: 2010-08-13 (Catznip-2.1.2a) | Added: Catznip-2.1.1d { - //*TODO move here the exact removing code from LLWearableBridge::removeItemFromAvatar in the future - LLWearableBridge::removeItemFromAvatar(item_to_remove); + /*const*/ LLWearable* pWearable = gAgentWearables.getWearableFromItemID(item_to_remove->getLinkedUUID()); + if ( (pWearable) && (LLAssetType::AT_BODYPART != pWearable->getAssetType()) ) + { + U32 idxWearable = gAgentWearables.getWearableIndex(pWearable); + if (idxWearable < LLAgentWearables::MAX_CLOTHING_PER_TYPE) + { + gAgentWearables.removeWearable(pWearable->getType(), false, idxWearable); + + LLAppearanceMgr::instance().removeCOFItemLinks(item_to_remove->getLinkedUUID(), false); + gInventory.notifyObservers(); + } + } } +// [/SL:KB] break; case LLAssetType::AT_OBJECT: LLVOAvatarSelf::detachAttachmentIntoInventory(item_to_remove->getLinkedUUID()); @@ -2685,7 +2790,11 @@ void LLAppearanceMgr::registerAttachment(const LLUUID& item_id) // we have to pass do_update = true to call LLAppearanceMgr::updateAppearanceFromCOF. // it will trigger gAgentWariables.notifyLoadingFinished() // But it is not acceptable solution. See EXT-7777 - LLAppearanceMgr::addCOFItemLink(item_id, false); // Add COF link for item. +// LLAppearanceMgr::addCOFItemLink(item_id, false); // Add COF link for item. +// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-08-31 (Catznip-2.1.2a) | Added: Catznip-2.1.2a + mPendingObjLinks.push_back(item_id); + LLAppearanceMgr::addCOFItemLink(item_id, false, new LLRegisterAttachmentCallback()); // Add COF link for item. +// [/SL:KB] } else { diff --git a/indra/newview/llappearancemgr.h b/indra/newview/llappearancemgr.h index c65d9dc9eeda8448d3c3042fb336a14d2d095fa4..d77d726b74a3b07f965ba9ea025a1cb8a581bd5c 100644 --- a/indra/newview/llappearancemgr.h +++ b/indra/newview/llappearancemgr.h @@ -217,6 +217,19 @@ private: std::auto_ptr<LLOutfitUnLockTimer> mUnlockOutfitTimer; +// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-08-31 (Catznip-2.1.2a) | Added: Catznip-2.1.2a +public: + void onRegisterAttachmentComplete(const LLUUID& idItem) + { + const LLUUID& idItemBase = gInventory.getLinkedItemID(idItem); + uuid_vec_t::iterator itPendingObjLink = std::find(mPendingObjLinks.begin(), mPendingObjLinks.end(), idItemBase); + if (itPendingObjLink != mPendingObjLinks.end()) + mPendingObjLinks.erase(itPendingObjLink); + } +private: + uuid_vec_t mPendingObjLinks; +// [/SL:KB] + ////////////////////////////////////////////////////////////////////////////////// // Item-specific convenience functions public: @@ -243,6 +256,19 @@ private: bool mUpdateBaseOrder; }; +// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-08-31 (Catznip-2.1.2a) | Added: Catznip-2.1.2a +class LLRegisterAttachmentCallback : public LLInventoryCallback +{ +public: + LLRegisterAttachmentCallback() {} + /*virtual*/ ~LLRegisterAttachmentCallback() {} + + /*virtual*/ void fire(const LLUUID& idItem) + { + LLAppearanceMgr::instance().onRegisterAttachmentComplete(idItem); + } +}; +// [/SL:KB] #define SUPPORT_ENSEMBLES 0 diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 02e7f0b9e2b65d3d47ba64b77a2b8d3b1b4200cf..07d13cf72950ba51302d3b640c1d0379a53ce5f0 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -4327,11 +4327,16 @@ void remove_inventory_category_from_avatar_step2( BOOL proceed, LLUUID category_ continue; if (get_is_item_worn(item->getUUID())) { +/* LLWearableList::instance().getAsset(item->getAssetUUID(), item->getName(), item->getType(), LLWearableBridge::onRemoveFromAvatarArrived, new OnRemoveStruct(item->getLinkedUUID())); +*/ +// [SL:KB] - Patch: Appearance-RemoveWearableFromAvatar | Checked: 2010-08-13 (Catznip-2.1.2a) | Added: Catznip-2.1.1d + LLAppearanceMgr::instance().removeItemFromAvatar(item->getUUID()); +// [/SL:KB] } } } @@ -4562,6 +4567,7 @@ void LLWearableBridge::wearAddOnAvatar() } // static +/* void LLWearableBridge::onWearOnAvatarArrived( LLWearable* wearable, void* userdata ) { LLUUID* item_id = (LLUUID*) userdata; @@ -4585,9 +4591,11 @@ void LLWearableBridge::onWearOnAvatarArrived( LLWearable* wearable, void* userda } delete item_id; } +*/ // static // BAP remove the "add" code path once everything is fully COF-ified. +/* void LLWearableBridge::onWearAddOnAvatarArrived( LLWearable* wearable, void* userdata ) { LLUUID* item_id = (LLUUID*) userdata; @@ -4612,6 +4620,7 @@ void LLWearableBridge::onWearAddOnAvatarArrived( LLWearable* wearable, void* use } delete item_id; } +*/ // static BOOL LLWearableBridge::canEditOnAvatar(void* user_data) @@ -4649,6 +4658,7 @@ BOOL LLWearableBridge::canRemoveFromAvatar(void* user_data) } // static +/* void LLWearableBridge::onRemoveFromAvatar(void* user_data) { LLWearableBridge* self = (LLWearableBridge*)user_data; @@ -4667,8 +4677,10 @@ void LLWearableBridge::onRemoveFromAvatar(void* user_data) } } } +*/ // static +/* void LLWearableBridge::onRemoveFromAvatarArrived(LLWearable* wearable, void* userdata) { @@ -4696,6 +4708,7 @@ void LLWearableBridge::onRemoveFromAvatarArrived(LLWearable* wearable, delete on_remove_struct; } +*/ // static void LLWearableBridge::removeAllClothesFromAvatar() @@ -4706,7 +4719,10 @@ void LLWearableBridge::removeAllClothesFromAvatar() if (itype == LLWearableType::WT_SHAPE || itype == LLWearableType::WT_SKIN || itype == LLWearableType::WT_HAIR || itype == LLWearableType::WT_EYES) continue; - for (S32 index = gAgentWearables.getWearableCount(itype)-1; index >= 0 ; --index) +// for (S32 index = gAgentWearables.getWearableCount(itype)-1; index >= 0 ; --index) +// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-09-04 (Catznip-2.1.2a) | Added: Catznip-2.1.2a + for (S32 index = gAgentWearables.getWearableCount((LLWearableType::EType)itype)-1; index >= 0 ; --index) +// [/SL:KB] { LLViewerInventoryItem *item = dynamic_cast<LLViewerInventoryItem*>( gAgentWearables.getWearableInventoryItem((LLWearableType::EType)itype, index)); @@ -4732,11 +4748,16 @@ void LLWearableBridge::removeItemFromAvatar(LLViewerInventoryItem *item) { if (item) { +/* LLWearableList::instance().getAsset(item->getAssetUUID(), item->getName(), item->getType(), LLWearableBridge::onRemoveFromAvatarArrived, new OnRemoveStruct(item->getUUID())); +*/ +// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-08-13 (Catznip-2.1.2a) | Added: Catznip-2.1.1d + LLAppearanceMgr::instance().removeItemFromAvatar(item->getUUID()); +// [/SL:KB] } } diff --git a/indra/newview/llinventorybridge.h b/indra/newview/llinventorybridge.h index 14abdd76b9e8970baec559f475f1589ed68e7b88..2e3535eea62b5e7065b2eef48fadccf62843f995 100644 --- a/indra/newview/llinventorybridge.h +++ b/indra/newview/llinventorybridge.h @@ -470,10 +470,10 @@ public: static void onWearOnAvatar( void* userdata ); // Access to wearOnAvatar() from menu static BOOL canWearOnAvatar( void* userdata ); - static void onWearOnAvatarArrived( LLWearable* wearable, void* userdata ); +// static void onWearOnAvatarArrived( LLWearable* wearable, void* userdata ); void wearOnAvatar(); - static void onWearAddOnAvatarArrived( LLWearable* wearable, void* userdata ); +// static void onWearAddOnAvatarArrived( LLWearable* wearable, void* userdata ); void wearAddOnAvatar(); static BOOL canEditOnAvatar( void* userdata ); // Access to editOnAvatar() from menu @@ -481,8 +481,8 @@ public: void editOnAvatar(); static BOOL canRemoveFromAvatar( void* userdata ); - static void onRemoveFromAvatar( void* userdata ); - static void onRemoveFromAvatarArrived( LLWearable* wearable, void* userdata ); +// static void onRemoveFromAvatar( void* userdata ); +// static void onRemoveFromAvatarArrived( LLWearable* wearable, void* userdata ); static void removeItemFromAvatar(LLViewerInventoryItem *item); static void removeAllClothesFromAvatar(); void removeFromAvatar(); diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 46d8f65d23d97220a94d1b8b90522dbc0696ec8f..35dc8d4caf0bb49d0c477b35634c7e208d899802 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -5576,7 +5576,13 @@ LLViewerJointAttachment* LLVOAvatar::getTargetAttachmentPoint(LLViewerObject* vi if (!attachment) { llwarns << "Object attachment point invalid: " << attachmentID << llendl; - attachment = get_if_there(mAttachmentPoints, 1, (LLViewerJointAttachment*)NULL); // Arbitrary using 1 (chest) +// attachment = get_if_there(mAttachmentPoints, 1, (LLViewerJointAttachment*)NULL); // Arbitrary using 1 (chest) +// [SL:KB] - Patch: Appearance-LegacyMultiAttachment | Checked: 2010-08-28 (Catznip-2.1.2a) | Added: Catznip2.1.2a + S32 idxAttachPt = 1; + if ( (!isSelf()) && (gSavedSettings.getBOOL("LegacyMultiAttachmentSupport")) && (attachmentID > 38) && (attachmentID <= 68) ) + idxAttachPt = attachmentID - 38; + attachment = get_if_there(mAttachmentPoints, idxAttachPt, (LLViewerJointAttachment*)NULL); // Arbitrary using 1 (chest) +// [/SL:KB] } return attachment; diff --git a/indra/newview/llwearablelist.cpp b/indra/newview/llwearablelist.cpp index ddbcdfc3f7a2d35f4182f0208b20a0a681091621..d88e7531fcd6275cc67b1d139b0e6740f9ea4086 100644 --- a/indra/newview/llwearablelist.cpp +++ b/indra/newview/llwearablelist.cpp @@ -95,8 +95,18 @@ void LLWearableList::processGetAssetReply( const char* filename, const LLAssetID { BOOL isNewWearable = FALSE; LLWearableArrivedData* data = (LLWearableArrivedData*) userdata; - LLWearable* wearable = NULL; // NULL indicates failure - +// LLWearable* wearable = NULL; // NULL indicates failure +// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-08-13 (Catznip-2.1.2a) | Added: Catznip-2.1.1d + LLWearable* wearable = get_if_there(LLWearableList::instance().mList, uuid, (LLWearable*)NULL); + if (wearable) + { + if(data->mCallback) + data->mCallback(wearable, data->mUserdata); + delete data; + return; + } +// [/SL:KB] + if( !filename ) { LL_WARNS("Wearable") << "Bad Wearable Asset: missing file." << LL_ENDL;