From d305028f70df3d0afc23e3fce1a2cd51c848998c Mon Sep 17 00:00:00 2001 From: Kitty Barnett Date: Thu, 30 Oct 2014 01:18:42 +0200 Subject: [PATCH] - internal : random apperance-related reviewing --HG-- branch : RLVa --- indra/newview/llagentwearables.cpp | 140 ++++++++++++++--------------- indra/newview/llagentwearables.h | 4 +- indra/newview/llattachmentsmgr.cpp | 4 +- indra/newview/llattachmentsmgr.h | 2 +- indra/newview/rlvhelper.h | 2 + 5 files changed, 77 insertions(+), 75 deletions(-) diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp index fbf181bc1c..91bae93857 100644 --- a/indra/newview/llagentwearables.cpp +++ b/indra/newview/llagentwearables.cpp @@ -1117,7 +1117,7 @@ void LLAgentWearables::setWearableOutfit(const LLInventoryItem::item_array_t& it } -//// User has picked "wear on avatar" from a menu. +// User has picked "wear on avatar" from a menu. //void LLAgentWearables::setWearableItem(LLInventoryItem* new_item, LLViewerWearable* new_wearable, bool do_append) //{ // //LLAgentDumper dumper("setWearableItem"); @@ -1159,78 +1159,78 @@ void LLAgentWearables::setWearableOutfit(const LLInventoryItem::item_array_t& it //} // static -bool LLAgentWearables::onSetWearableDialog(const LLSD& notification, const LLSD& response, LLViewerWearable* wearable) -{ - S32 option = LLNotificationsUtil::getSelectedOption(notification, response); - LLInventoryItem* new_item = gInventory.getItem(notification["payload"]["item_id"].asUUID()); - U32 index = gAgentWearables.getWearableIndex(wearable); - if (!new_item) - { - delete wearable; - return false; - } - - switch(option) - { - case 0: // "Save" - gAgentWearables.saveWearable(wearable->getType(),index); - gAgentWearables.setWearableFinal(new_item, wearable); - break; - - case 1: // "Don't Save" - gAgentWearables.setWearableFinal(new_item, wearable); - break; - - case 2: // "Cancel" - break; - - default: - llassert(0); - break; - } - - delete wearable; - return false; -} +//bool LLAgentWearables::onSetWearableDialog(const LLSD& notification, const LLSD& response, LLViewerWearable* wearable) +//{ +// S32 option = LLNotificationsUtil::getSelectedOption(notification, response); +// LLInventoryItem* new_item = gInventory.getItem(notification["payload"]["item_id"].asUUID()); +// U32 index = gAgentWearables.getWearableIndex(wearable); +// if (!new_item) +// { +// delete wearable; +// return false; +// } +// +// switch(option) +// { +// case 0: // "Save" +// gAgentWearables.saveWearable(wearable->getType(),index); +// gAgentWearables.setWearableFinal(new_item, wearable); +// break; +// +// case 1: // "Don't Save" +// gAgentWearables.setWearableFinal(new_item, wearable); +// break; +// +// case 2: // "Cancel" +// break; +// +// default: +// llassert(0); +// break; +// } +// +// delete wearable; +// return false; +//} // Called from setWearableItem() and onSetWearableDialog() to actually set the wearable. // MULTI_WEARABLE: unify code after null objects are gone. -void LLAgentWearables::setWearableFinal(LLInventoryItem* new_item, LLViewerWearable* new_wearable, bool do_append) -{ - const LLWearableType::EType type = new_wearable->getType(); - - if (do_append && getWearableItemID(type,0).notNull()) - { - new_wearable->setItemID(new_item->getUUID()); - const bool trigger_updated = false; - pushWearable(type, new_wearable, trigger_updated); - LL_INFOS() << "Added additional wearable for type " << type - << " size is now " << getWearableCount(type) << LL_ENDL; - checkWearableAgainstInventory(new_wearable); - } - else - { - // Replace the old wearable with a new one. - llassert(new_item->getAssetUUID() == new_wearable->getAssetID()); - - LLViewerWearable *old_wearable = getViewerWearable(type,0); - LLUUID old_item_id; - if (old_wearable) - { - old_item_id = old_wearable->getItemID(); - } - new_wearable->setItemID(new_item->getUUID()); - setWearable(type,0,new_wearable); - - if (old_item_id.notNull()) - { - gInventory.addChangedMask(LLInventoryObserver::LABEL, old_item_id); - gInventory.notifyObservers(); - } - LL_INFOS() << "Replaced current element 0 for type " << type - << " size is now " << getWearableCount(type) << LL_ENDL; - } -} +//void LLAgentWearables::setWearableFinal(LLInventoryItem* new_item, LLViewerWearable* new_wearable, bool do_append) +//{ +// const LLWearableType::EType type = new_wearable->getType(); +// +// if (do_append && getWearableItemID(type,0).notNull()) +// { +// new_wearable->setItemID(new_item->getUUID()); +// const bool trigger_updated = false; +// pushWearable(type, new_wearable, trigger_updated); +// LL_INFOS() << "Added additional wearable for type " << type +// << " size is now " << getWearableCount(type) << LL_ENDL; +// checkWearableAgainstInventory(new_wearable); +// } +// else +// { +// // Replace the old wearable with a new one. +// llassert(new_item->getAssetUUID() == new_wearable->getAssetID()); +// +// LLViewerWearable *old_wearable = getViewerWearable(type,0); +// LLUUID old_item_id; +// if (old_wearable) +// { +// old_item_id = old_wearable->getItemID(); +// } +// new_wearable->setItemID(new_item->getUUID()); +// setWearable(type,0,new_wearable); +// +// if (old_item_id.notNull()) +// { +// gInventory.addChangedMask(LLInventoryObserver::LABEL, old_item_id); +// gInventory.notifyObservers(); +// } +// LL_INFOS() << "Replaced current element 0 for type " << type +// << " size is now " << getWearableCount(type) << LL_ENDL; +// } +//} // User has picked "remove from avatar" from a menu. // static diff --git a/indra/newview/llagentwearables.h b/indra/newview/llagentwearables.h index 4db7183fb3..c0e47a0152 100755 --- a/indra/newview/llagentwearables.h +++ b/indra/newview/llagentwearables.h @@ -116,8 +116,8 @@ public: void addLocalTextureObject(const LLWearableType::EType wearable_type, const LLAvatarAppearanceDefines::ETextureIndex texture_type, U32 wearable_index); protected: - void setWearableFinal(LLInventoryItem* new_item, LLViewerWearable* new_wearable, bool do_append = false); - static bool onSetWearableDialog(const LLSD& notification, const LLSD& response, LLViewerWearable* wearable); +// void setWearableFinal(LLInventoryItem* new_item, LLViewerWearable* new_wearable, bool do_append = false); +// static bool onSetWearableDialog(const LLSD& notification, const LLSD& response, LLViewerWearable* wearable); void addWearableToAgentInventory(LLPointer cb, LLViewerWearable* wearable, diff --git a/indra/newview/llattachmentsmgr.cpp b/indra/newview/llattachmentsmgr.cpp index 909c1d517e..acba957b45 100755 --- a/indra/newview/llattachmentsmgr.cpp +++ b/indra/newview/llattachmentsmgr.cpp @@ -49,7 +49,7 @@ LLAttachmentsMgr::~LLAttachmentsMgr() void LLAttachmentsMgr::addAttachment(const LLUUID& item_id, const U8 attachment_pt, // const BOOL add) -// [RLVa:KB] - Checked: 2010-09-13 (RLVa-1.2.1c) | Added: RLVa-1.2.1c +// [RLVa:KB] - Checked: 2010-09-13 (RLVa-1.2.1) const BOOL add, const BOOL fRlvForce /*=FALSE*/) // [/RLVa:KB] { @@ -58,7 +58,7 @@ void LLAttachmentsMgr::addAttachment(const LLUUID& item_id, attachment.mAttachmentPt = attachment_pt; attachment.mAdd = add; -// [RLVa:KB] - Checked: 2010-09-23 (RLVa-1.2.1d) | Modified: RLVa-1.2.1d +// [RLVa:KB] - Checked: 2010-09-23 (RLVa-1.2.1) if ( (rlv_handler_t::isEnabled()) && (!fRlvForce) && (gRlvAttachmentLocks.hasLockedAttachmentPoint(RLV_LOCK_ANY)) ) { const LLInventoryItem* pItem = gInventory.getItem(item_id); diff --git a/indra/newview/llattachmentsmgr.h b/indra/newview/llattachmentsmgr.h index 997db59d22..825da55f51 100755 --- a/indra/newview/llattachmentsmgr.h +++ b/indra/newview/llattachmentsmgr.h @@ -55,7 +55,7 @@ public: void addAttachment(const LLUUID& item_id, const U8 attachment_pt, // const BOOL add); -// [RLVa:KB] - Checked: 2010-09-13 (RLVa-1.2.1c) | Added: RLVa-1.2.1c +// [RLVa:KB] - Checked: 2010-09-13 (RLVa-1.2.1) const BOOL add, const BOOL fRlvForce = FALSE); // [/RLVa:KB] static void onIdle(void *); diff --git a/indra/newview/rlvhelper.h b/indra/newview/rlvhelper.h index 3d0a5e592b..b97e4a8cb6 100644 --- a/indra/newview/rlvhelper.h +++ b/indra/newview/rlvhelper.h @@ -374,6 +374,7 @@ public: virtual BOOL tick(); }; +// NOTE: Unused as of SL-3.7.2 class RlvCallbackTimerOnce : public LLEventTimer { public: @@ -389,6 +390,7 @@ protected: nullary_func_t m_Callback; }; +// NOTE: Unused as of SL-3.7.2 inline void rlvCallbackTimerOnce(F32 nPeriod, RlvCallbackTimerOnce::nullary_func_t cb) { // Timer will automatically delete itself after the callback