diff options
author | Merov Linden <merov@lindenlab.com> | 2013-06-19 14:06:06 -0700 |
---|---|---|
committer | Merov Linden <merov@lindenlab.com> | 2013-06-19 14:06:06 -0700 |
commit | 7da4c651911743707c0cc7cd4bebdcefb52eb379 (patch) | |
tree | 6f99d83a2b2bf3de810dd5a1191a47f7cc53ac9d /indra/newview/llagentwearables.cpp | |
parent | f1e594feceb8ab284e023e164d5410cd53a656cb (diff) | |
parent | 2655c7a17ae38a073dcf8f05b0127b68edc34c95 (diff) |
Pull merge from lindenlab/viewer-release
Diffstat (limited to 'indra/newview/llagentwearables.cpp')
-rwxr-xr-x | indra/newview/llagentwearables.cpp | 76 |
1 files changed, 38 insertions, 38 deletions
diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp index c88694ef76..1edbbe2a2e 100755 --- a/indra/newview/llagentwearables.cpp +++ b/indra/newview/llagentwearables.cpp @@ -62,15 +62,15 @@ using namespace LLAvatarAppearanceDefines; // Callback to wear and start editing an item that has just been created. void wear_and_edit_cb(const LLUUID& inv_item) -{ - if (inv_item.isNull()) return; - - // Request editing the item after it gets worn. - gAgentWearables.requestEditingWearable(inv_item); - - // Wear it. - LLAppearanceMgr::instance().wearItemOnAvatar(inv_item); -} + { + if (inv_item.isNull()) return; + + // Request editing the item after it gets worn. + gAgentWearables.requestEditingWearable(inv_item); + + // Wear it. + LLAppearanceMgr::instance().wearItemOnAvatar(inv_item); + } /////////////////////////////////////////////////////////////////////////////// @@ -180,10 +180,10 @@ void LLAgentWearables::initClass() } void LLAgentWearables::setAvatarObject(LLVOAvatarSelf *avatar) -{ +{ llassert(avatar); - avatar->outputRezTiming("Sending wearables request"); - sendAgentWearablesRequest(); + avatar->outputRezTiming("Sending wearables request"); + sendAgentWearablesRequest(); setAvatarAppearance(avatar); } @@ -706,7 +706,7 @@ LLViewerWearable* LLAgentWearables::getViewerWearable(const LLWearableType::ETyp } const LLViewerWearable* LLAgentWearables::getViewerWearable(const LLWearableType::EType type, U32 index /*= 0*/) const -{ + { return dynamic_cast<const LLViewerWearable*> (getWearable(type, index)); } @@ -714,39 +714,39 @@ const LLViewerWearable* LLAgentWearables::getViewerWearable(const LLWearableType BOOL LLAgentWearables::selfHasWearable(LLWearableType::EType type) { return (gAgentWearables.getWearableCount(type) > 0); -} - + } + // virtual void LLAgentWearables::wearableUpdated(LLWearable *wearable, BOOL removed) -{ + { if (isAgentAvatarValid()) { const BOOL upload_result = removed; gAgentAvatarp->wearableUpdated(wearable->getType(), upload_result); - } +} LLWearableData::wearableUpdated(wearable, removed); if (!removed) - { +{ LLViewerWearable* viewer_wearable = dynamic_cast<LLViewerWearable*>(wearable); viewer_wearable->refreshName(); - // Hack pt 2. If the wearable we just loaded has definition version 24, - // then force a re-save of this wearable after slamming the version number to 22. - // This number was incorrectly incremented for internal builds before release, and - // this fix will ensure that the affected wearables are re-saved with the right version number. - // the versions themselves are compatible. This code can be removed before release. - if( wearable->getDefinitionVersion() == 24 ) - { - wearable->setDefinitionVersion(22); - U32 index = getWearableIndex(wearable); + // Hack pt 2. If the wearable we just loaded has definition version 24, + // then force a re-save of this wearable after slamming the version number to 22. + // This number was incorrectly incremented for internal builds before release, and + // this fix will ensure that the affected wearables are re-saved with the right version number. + // the versions themselves are compatible. This code can be removed before release. + if( wearable->getDefinitionVersion() == 24 ) + { + wearable->setDefinitionVersion(22); + U32 index = getWearableIndex(wearable); llinfos << "forcing wearable type " << wearable->getType() << " to version 22 from 24" << llendl; - saveWearable(wearable->getType(),index,TRUE); - } + saveWearable(wearable->getType(),index,TRUE); + } checkWearableAgainstInventory(viewer_wearable); - } +} } BOOL LLAgentWearables::itemUpdatePending(const LLUUID& item_id) const @@ -965,8 +965,8 @@ public: llinfos << "All items created" << llendl; LLPointer<LLInventoryCallback> link_waiter = new LLUpdateAppearanceOnDestroy; LLAppearanceMgr::instance().linkAll(LLAppearanceMgr::instance().getCOF(), - mItemsToLink, - link_waiter); + mItemsToLink, + link_waiter); } void addPendingWearable(LLViewerWearable *wearable) { @@ -1496,12 +1496,12 @@ void LLAgentWearables::queryWearableCache() // virtual void LLAgentWearables::invalidateBakedTextureHash(LLMD5& hash) const { - // Add some garbage into the hash so that it becomes invalid. - if (isAgentAvatarValid()) - { - hash.update((const unsigned char*)gAgentAvatarp->getID().mData, UUID_BYTES); - } -} + // Add some garbage into the hash so that it becomes invalid. + if (isAgentAvatarValid()) + { + hash.update((const unsigned char*)gAgentAvatarp->getID().mData, UUID_BYTES); + } + } // User has picked "remove from avatar" from a menu. // static |