Sync llappearancemgr.cpp with upstream and rllva

Remove old unused stuff
Comment out some questionable stuff that's not upstream
Rearrange a thing to match upstream

Hopefully this fixes the baking bug?
This commit is contained in:
Lirusaito
2016-05-26 10:13:42 -04:00
parent 0abb0c916c
commit 3bedb5f6d4
4 changed files with 377 additions and 513 deletions

View File

@@ -948,7 +948,6 @@ P(productInfoRequestResponder);
P(regionResponder);
P(remoteParcelRequestResponder);
P(requestAgentUpdateAppearance);
P2(incrementCofVersionResponder_timeouts, transfer_30s_connect_10s);
P(responderIgnore);
P(setDisplayNameResponder);
P2(baseFeaturesReceived, transfer_22s_connect_10s);

File diff suppressed because it is too large Load Diff

View File

@@ -58,7 +58,6 @@ public:
// [SL:KB] - Patch: Appearance-MixedViewers | Checked: 2010-04-02 (Catznip-3.0.0a) | Added: Catznip-2.0.0a
void updateAppearanceFromInitialWearables(LLInventoryObject::const_object_list_t& initial_items);
// [/SL:KB]
bool needToSaveCOF();
void updateCOF(const LLUUID& category, bool append = false);
// [RLVa:KB] - Checked: 2010-03-05 (RLVa-1.2.0a) | Added: RLVa-1.2.0a
void updateCOF(LLInventoryModel::item_array_t& body_items_new, LLInventoryModel::item_array_t& wear_items_new,
@@ -115,7 +114,6 @@ public:
// Copy all items in a category.
void shallowCopyCategoryContents(const LLUUID& src_id, const LLUUID& dst_id,
LLPointer<LLInventoryCallback> cb);
void copyItems(const LLUUID& dst_id, LLInventoryModel::item_array_t* items, LLPointer<LLInventoryCallback> cb);
// Find the Current Outfit folder.
const LLUUID getCOF() const;
@@ -156,6 +154,9 @@ public:
// Attachment link management
void unregisterAttachment(const LLUUID& item_id);
void registerAttachment(const LLUUID& item_id);
// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2015-06-24 (Catznip-3.7)
bool getAttachmentInvLinkEnable() { return mAttachmentInvLinkEnabled; }
// [/SL:KB]
void setAttachmentInvLinkEnable(bool val);
// Add COF link to individual item.
@@ -246,13 +247,6 @@ public:
void requestServerAppearanceUpdate();
void incrementCofVersion(LLHTTPClient::ResponderPtr responder_ptr = NULL);
U32 getNumAttachmentsInCOF();
// *HACK Remove this after server side texture baking is deployed on all sims.
void incrementCofVersionLegacy();
void setAppearanceServiceURL(const std::string& url) { mAppearanceServiceURL = url; }
std::string getAppearanceServiceURL() const;
@@ -279,11 +273,8 @@ private:
LLInventoryModel::item_array_t& gest_items,
bool follow_folder_links = false);
void purgeCategory(const LLUUID& category, bool keep_outfit_links);
static void onOutfitRename(const LLSD& notification, const LLSD& response);
bool mAttachmentInvLinkEnabled;
bool mOutfitIsDirty;
bool mIsInUpdateAppearanceFromCOF; // to detect recursive calls.
@@ -304,15 +295,6 @@ private:
void addDoomedTempAttachment(const LLUUID& id_to_remove);
// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-09-18 (Catznip-2.1)
public:
void linkPendingAttachments();
void clearPendingAttachment(const LLUUID& idItem);
void onRegisterAttachmentComplete(const LLUUID& idAttachItem);
private:
uuid_vec_t mPendingAttachLinks;
// [/SL:KB]
//////////////////////////////////////////////////////////////////////////////////
// Item-specific convenience functions
public:
@@ -320,11 +302,6 @@ public:
BOOL getIsInCOF(const LLUUID& obj_id) const;
// Is this in the COF and can the user delete it from the COF?
BOOL getIsProtectedCOFItem(const LLUUID& obj_id) const;
/**
* Checks if COF contains link to specified object.
*/
static bool isLinkInCOF(const LLUUID& obj_id);
};
class LLUpdateAppearanceOnDestroy: public LLInventoryCallback
@@ -344,22 +321,29 @@ private:
nullary_func_t mPostUpdateFunc;
};
// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-08-31 (Catznip-2.1)
class LLRegisterAttachmentCallback : public LLInventoryCallback
class LLUpdateAppearanceAndEditWearableOnDestroy: public LLInventoryCallback
{
public:
LLRegisterAttachmentCallback(const LLUUID& idAttachItem) : m_idAttachItem(idAttachItem) {}
/*virtual*/ void fire(const LLUUID&)
{
// NOTE: AISCommand::getResponseUUID() currently returns false so the passed UUID is NULL and hence useless
LLAppearanceMgr::instance().onRegisterAttachmentComplete(m_idAttachItem);
}
protected:
LLUUID m_idAttachItem;
};
// [/SL:KB]
void edit_wearable_and_customize_avatar(LLUUID item_id);
LLUpdateAppearanceAndEditWearableOnDestroy(const LLUUID& item_id);
/* virtual */ void fire(const LLUUID& item_id) {}
~LLUpdateAppearanceAndEditWearableOnDestroy();
private:
LLUUID mItemID;
};
class LLRequestServerAppearanceUpdateOnDestroy: public LLInventoryCallback
{
public:
LLRequestServerAppearanceUpdateOnDestroy() {}
~LLRequestServerAppearanceUpdateOnDestroy();
/* virtual */ void fire(const LLUUID& item_id) {}
};
void edit_wearable_and_customize_avatar(LLUUID item_id);
LLUUID findDescendentCategoryIDByName(const LLUUID& parent_id,const std::string& name);

View File

@@ -253,16 +253,18 @@ BOOL get_is_parent_to_worn_item(const LLUUID& id)
return FALSE;
}
BOOL get_is_item_worn(const LLInventoryItem *item)
{
if (!item)
return FALSE;
// Consider the item as worn if it has links in COF.
/* if (LLCOFMgr::instance().isLinkInCOF(item->getUUID()))
{ REMOVED due to advice from Kitty Barnett, looks like it WILL cause trouble on some grids -SG
return TRUE;
} */
// [SL:KB] - The code below causes problems across the board so it really just needs to go
// if (LLAppearanceMgr::instance().isLinkedInCOF(id))
// {
// return TRUE;
// }
switch(item->getType())
{
@@ -298,7 +300,7 @@ BOOL get_can_item_be_worn(const LLUUID& id)
if (!item)
return FALSE;
if (LLAppearanceMgr::isLinkInCOF(item->getLinkedUUID()))
if (LLAppearanceMgr::isLinkedInCOF(item->getLinkedUUID()))
{
// an item having links in COF (i.e. a worn item)
return FALSE;