Revert "THE BIGGIE."
This reverts commit ec55705bdd.
Conflicts:
indra/newview/ascentprefsvan.cpp
indra/newview/llinventorybridge.cpp
indra/newview/skins/default/xui/en-us/panel_preferences_ascent_vanity.xml
This commit is contained in:
@@ -3464,18 +3464,13 @@ void LLAgent::updateCamera()
|
||||
{
|
||||
LLVOAvatar::attachment_map_t::iterator curiter = iter++;
|
||||
LLViewerJointAttachment* attachment = curiter->second;
|
||||
for (LLViewerJointAttachment::attachedobjs_vec_t::iterator attachment_iter = attachment->mAttachedObjects.begin();
|
||||
attachment_iter != attachment->mAttachedObjects.end();
|
||||
++attachment_iter)
|
||||
LLViewerObject *attached_object = attachment->getObject();
|
||||
if (attached_object && !attached_object->isDead() && attached_object->mDrawable.notNull())
|
||||
{
|
||||
LLViewerObject *attached_object = (*attachment_iter);
|
||||
if (attached_object && !attached_object->isDead() && attached_object->mDrawable.notNull())
|
||||
{
|
||||
// clear any existing "early" movements of attachment
|
||||
attached_object->mDrawable->clearState(LLDrawable::EARLY_MOVE);
|
||||
gPipeline.updateMoveNormalAsync(attached_object->mDrawable);
|
||||
attached_object->updateText();
|
||||
}
|
||||
// clear any existing "early" movements of attachment
|
||||
attached_object->mDrawable->clearState(LLDrawable::EARLY_MOVE);
|
||||
gPipeline.updateMoveNormalAsync(attached_object->mDrawable);
|
||||
attached_object->updateText();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6640,15 +6635,7 @@ void LLAgent::sendAgentWearablesUpdate()
|
||||
if( wearable )
|
||||
{
|
||||
LL_DEBUGS("Wearables") << "Sending wearable " << wearable->getName() << " mItemID = " << mWearableEntry[ i ].mItemID << LL_ENDL;
|
||||
LLUUID item_id = mWearableEntry[i].mItemID;
|
||||
const LLViewerInventoryItem *item = gInventory.getItem(item_id);
|
||||
if (item && item->getIsLinkType())
|
||||
{
|
||||
// Get the itemID that this item points to. i.e. make sure
|
||||
// we are storing baseitems, not their links, in the database.
|
||||
item_id = item->getLinkedUUID();
|
||||
}
|
||||
gMessageSystem->addUUIDFast(_PREHASH_ItemID, item_id);
|
||||
gMessageSystem->addUUIDFast(_PREHASH_ItemID, mWearableEntry[ i ].mItemID );
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -6957,8 +6944,7 @@ BOOL LLAgent::selfHasWearable( void* userdata )
|
||||
|
||||
BOOL LLAgent::isWearingItem( const LLUUID& item_id )
|
||||
{
|
||||
const LLUUID& base_item_id = gInventory.getLinkedItemID(item_id);
|
||||
return (getWearableFromWearableItem(base_item_id) != NULL);
|
||||
return (getWearableFromWearableItem( item_id ) != NULL);
|
||||
}
|
||||
|
||||
// static
|
||||
@@ -7262,7 +7248,6 @@ void LLAgent::makeNewOutfit(
|
||||
new_folder_name);
|
||||
|
||||
bool found_first_item = false;
|
||||
BOOL no_link = !gSavedSettings.getBOOL("BeauchampUseInventoryLinks");
|
||||
|
||||
///////////////////
|
||||
// Wearables
|
||||
@@ -7272,6 +7257,7 @@ void LLAgent::makeNewOutfit(
|
||||
// Then, iterate though each of the wearables and save copies of them in the folder.
|
||||
S32 i;
|
||||
S32 count = wearables_to_include.count();
|
||||
LLDynamicArray<LLUUID> delete_items;
|
||||
LLPointer<LLRefCount> cbdone = NULL;
|
||||
for( i = 0; i < count; ++i )
|
||||
{
|
||||
@@ -7279,69 +7265,53 @@ void LLAgent::makeNewOutfit(
|
||||
LLWearable* old_wearable = mWearableEntry[ index ].mWearable;
|
||||
if( old_wearable )
|
||||
{
|
||||
LLViewerInventoryItem* item = gInventory.getItem(mWearableEntry[index].mItemID);
|
||||
std::string new_name = item->getName();
|
||||
std::string new_name;
|
||||
LLWearable* new_wearable;
|
||||
new_wearable = gWearableList.createCopy(old_wearable);
|
||||
if (rename_clothing)
|
||||
{
|
||||
new_name = new_folder_name;
|
||||
new_name.append(" ");
|
||||
new_name.append(old_wearable->getTypeLabel());
|
||||
LLStringUtil::truncate(new_name, DB_INV_ITEM_NAME_STR_LEN);
|
||||
new_wearable->setName(new_name);
|
||||
}
|
||||
|
||||
if (no_link || isWearableCopyable((EWearableType)index))
|
||||
LLViewerInventoryItem* item = gInventory.getItem(mWearableEntry[index].mItemID);
|
||||
S32 todo = addWearableToAgentInventoryCallback::CALL_NONE;
|
||||
if (!found_first_item)
|
||||
{
|
||||
LLWearable* new_wearable = gWearableList.createCopy(old_wearable);
|
||||
if (rename_clothing)
|
||||
{
|
||||
new_wearable->setName(new_name);
|
||||
}
|
||||
|
||||
S32 todo = addWearableToAgentInventoryCallback::CALL_NONE;
|
||||
if (!found_first_item)
|
||||
{
|
||||
found_first_item = true;
|
||||
/* set the focus to the first item */
|
||||
todo |= addWearableToAgentInventoryCallback::CALL_MAKENEWOUTFITDONE;
|
||||
/* send the agent wearables update when done */
|
||||
cbdone = new sendAgentWearablesUpdateCallback;
|
||||
}
|
||||
LLPointer<LLInventoryCallback> cb =
|
||||
new addWearableToAgentInventoryCallback(
|
||||
cbdone,
|
||||
index,
|
||||
new_wearable,
|
||||
todo);
|
||||
if (isWearableCopyable((EWearableType)index))
|
||||
{
|
||||
copy_inventory_item(
|
||||
gAgent.getID(),
|
||||
item->getPermissions().getOwner(),
|
||||
item->getLinkedUUID(),
|
||||
folder_id,
|
||||
new_name,
|
||||
cb);
|
||||
}
|
||||
else
|
||||
{
|
||||
move_inventory_item(
|
||||
gAgent.getID(),
|
||||
gAgent.getSessionID(),
|
||||
item->getLinkedUUID(),
|
||||
folder_id,
|
||||
new_name,
|
||||
cb);
|
||||
}
|
||||
found_first_item = true;
|
||||
/* set the focus to the first item */
|
||||
todo |= addWearableToAgentInventoryCallback::CALL_MAKENEWOUTFITDONE;
|
||||
/* send the agent wearables update when done */
|
||||
cbdone = new sendAgentWearablesUpdateCallback;
|
||||
}
|
||||
LLPointer<LLInventoryCallback> cb =
|
||||
new addWearableToAgentInventoryCallback(
|
||||
cbdone,
|
||||
index,
|
||||
new_wearable,
|
||||
todo);
|
||||
if (isWearableCopyable((EWearableType)index))
|
||||
{
|
||||
copy_inventory_item(
|
||||
gAgent.getID(),
|
||||
item->getPermissions().getOwner(),
|
||||
item->getUUID(),
|
||||
folder_id,
|
||||
new_name,
|
||||
cb);
|
||||
}
|
||||
else
|
||||
{
|
||||
link_inventory_item(
|
||||
move_inventory_item(
|
||||
gAgent.getID(),
|
||||
item->getLinkedUUID(),
|
||||
gAgent.getSessionID(),
|
||||
item->getUUID(),
|
||||
folder_id,
|
||||
item->getName(), // Apparently, links cannot have arbitrary names...
|
||||
LLAssetType::AT_LINK,
|
||||
LLPointer<LLInventoryCallback>(NULL));
|
||||
new_name,
|
||||
cb);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -7354,55 +7324,39 @@ void LLAgent::makeNewOutfit(
|
||||
|
||||
if( attachments_to_include.count() )
|
||||
{
|
||||
BOOL msg_started = FALSE;
|
||||
LLMessageSystem* msg = gMessageSystem;
|
||||
for( S32 i = 0; i < attachments_to_include.count(); i++ )
|
||||
{
|
||||
S32 attachment_pt = attachments_to_include[i];
|
||||
LLViewerJointAttachment* attachment = get_if_there(mAvatarObject->mAttachmentPoints, attachment_pt, (LLViewerJointAttachment*)NULL );
|
||||
if(!attachment) continue;
|
||||
for (LLViewerJointAttachment::attachedobjs_vec_t::iterator attachment_iter = attachment->mAttachedObjects.begin();
|
||||
attachment_iter != attachment->mAttachedObjects.end();
|
||||
++attachment_iter)
|
||||
{
|
||||
LLViewerObject *attached_object = (*attachment_iter);
|
||||
if (!attached_object) continue;
|
||||
const LLUUID& item_id = attached_object->getAttachmentItemID();
|
||||
if (item_id.isNull()) continue;
|
||||
LLInventoryItem* item = gInventory.getItem(item_id);
|
||||
if (!item) continue;
|
||||
if (no_link || item->getPermissions().allowCopyBy(gAgent.getID()))
|
||||
{
|
||||
const LLUUID& old_folder_id = item->getParentUUID();
|
||||
move_inventory_item(
|
||||
gAgent.getID(),
|
||||
gAgent.getSessionID(),
|
||||
item->getLinkedUUID(),
|
||||
folder_id,
|
||||
item->getName(),
|
||||
LLPointer<LLInventoryCallback>(NULL));
|
||||
|
||||
if (item->getPermissions().allowCopyBy(gAgent.getID()))
|
||||
{
|
||||
copy_inventory_item(
|
||||
gAgent.getID(),
|
||||
item->getPermissions().getOwner(),
|
||||
item->getLinkedUUID(),
|
||||
old_folder_id,
|
||||
item->getName(),
|
||||
LLPointer<LLInventoryCallback>(NULL));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
link_inventory_item(
|
||||
gAgent.getID(),
|
||||
item->getLinkedUUID(),
|
||||
folder_id,
|
||||
item->getName(),
|
||||
LLAssetType::AT_LINK,
|
||||
LLPointer<LLInventoryCallback>(NULL));
|
||||
}
|
||||
LLViewerObject* attached_object = attachment->getObject();
|
||||
if(!attached_object) continue;
|
||||
const LLUUID& item_id = attachment->getItemID();
|
||||
if(item_id.isNull()) continue;
|
||||
LLInventoryItem* item = gInventory.getItem(item_id);
|
||||
if(!item) continue;
|
||||
if(!msg_started)
|
||||
{
|
||||
msg_started = TRUE;
|
||||
msg->newMessage("CreateNewOutfitAttachments");
|
||||
msg->nextBlock("AgentData");
|
||||
msg->addUUID("AgentID", getID());
|
||||
msg->addUUID("SessionID", getSessionID());
|
||||
msg->nextBlock("HeaderData");
|
||||
msg->addUUID("NewFolderID", folder_id);
|
||||
}
|
||||
msg->nextBlock("ObjectData");
|
||||
msg->addUUID("OldItemID", item_id);
|
||||
msg->addUUID("OldFolderID", item->getParentUUID());
|
||||
}
|
||||
|
||||
if( msg_started )
|
||||
{
|
||||
sendReliableMessage();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8054,16 +8008,11 @@ void LLAgent::userRemoveAllAttachments( void* userdata )
|
||||
{
|
||||
LLVOAvatar::attachment_map_t::iterator curiter = iter++;
|
||||
LLViewerJointAttachment* attachment = curiter->second;
|
||||
for (LLViewerJointAttachment::attachedobjs_vec_t::iterator attachment_iter = attachment->mAttachedObjects.begin();
|
||||
attachment_iter != attachment->mAttachedObjects.end();
|
||||
++attachment_iter)
|
||||
LLViewerObject* objectp = attachment->getObject();
|
||||
if (objectp)
|
||||
{
|
||||
LLViewerObject *attached_object = (*attachment_iter);
|
||||
if (attached_object)
|
||||
{
|
||||
gMessageSystem->nextBlockFast(_PREHASH_ObjectData);
|
||||
gMessageSystem->addU32Fast(_PREHASH_ObjectLocalID, attached_object->getLocalID());
|
||||
}
|
||||
gMessageSystem->nextBlockFast(_PREHASH_ObjectData);
|
||||
gMessageSystem->addU32Fast(_PREHASH_ObjectLocalID, objectp->getLocalID());
|
||||
}
|
||||
}
|
||||
gMessageSystem->sendReliable( gAgent.getRegionHost() );
|
||||
|
||||
Reference in New Issue
Block a user