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:
@@ -2208,7 +2208,7 @@ class LLSelfEnableRemoveAllAttachments : public view_listener_t
|
||||
{
|
||||
LLVOAvatar::attachment_map_t::iterator curiter = iter++;
|
||||
LLViewerJointAttachment* attachment = curiter->second;
|
||||
if (attachment->getNumObjects() > 0)
|
||||
if (attachment->getObject())
|
||||
{
|
||||
new_value = true;
|
||||
break;
|
||||
@@ -6636,46 +6636,35 @@ class LLAttachmentDrop : public view_listener_t
|
||||
// called from avatar pie menu
|
||||
void handle_detach_from_avatar(void* user_data)
|
||||
{
|
||||
LLViewerJointAttachment *attachment = (LLViewerJointAttachment*)user_data;
|
||||
LLViewerJointAttachment *attachment = (LLViewerJointAttachment *)user_data;
|
||||
|
||||
if (attachment->getNumObjects() > 0)
|
||||
LLViewerObject* attached_object = attachment->getObject();
|
||||
|
||||
if (attached_object)
|
||||
{
|
||||
gMessageSystem->newMessage("ObjectDetach");
|
||||
gMessageSystem->nextBlockFast(_PREHASH_AgentData);
|
||||
gMessageSystem->addUUIDFast(_PREHASH_AgentID, gAgent.getID() );
|
||||
gMessageSystem->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
|
||||
|
||||
for (LLViewerJointAttachment::attachedobjs_vec_t::const_iterator iter = attachment->mAttachedObjects.begin();
|
||||
iter != attachment->mAttachedObjects.end();
|
||||
iter++)
|
||||
{
|
||||
LLViewerObject *attached_object = (*iter);
|
||||
gMessageSystem->nextBlockFast(_PREHASH_ObjectData);
|
||||
gMessageSystem->addU32Fast(_PREHASH_ObjectLocalID, attached_object->getLocalID());
|
||||
}
|
||||
gMessageSystem->nextBlockFast(_PREHASH_ObjectData);
|
||||
gMessageSystem->addU32Fast(_PREHASH_ObjectLocalID, attached_object->getLocalID());
|
||||
gMessageSystem->sendReliable( gAgent.getRegionHost() );
|
||||
}
|
||||
}
|
||||
|
||||
void attach_label(std::string& label, void* user_data)
|
||||
{
|
||||
LLViewerJointAttachment *attachment = (LLViewerJointAttachment*)user_data;
|
||||
if (attachment)
|
||||
LLViewerJointAttachment* attachmentp = (LLViewerJointAttachment*)user_data;
|
||||
if (attachmentp)
|
||||
{
|
||||
label = attachment->getName();
|
||||
for (LLViewerJointAttachment::attachedobjs_vec_t::const_iterator attachment_iter = attachment->mAttachedObjects.begin();
|
||||
attachment_iter != attachment->mAttachedObjects.end();
|
||||
++attachment_iter)
|
||||
label = attachmentp->getName();
|
||||
if (attachmentp->getObject())
|
||||
{
|
||||
const LLViewerObject* attached_object = (*attachment_iter);
|
||||
if (attached_object)
|
||||
LLViewerInventoryItem* itemp = gInventory.getItem(attachmentp->getItemID());
|
||||
if (itemp)
|
||||
{
|
||||
LLViewerInventoryItem* itemp = gInventory.getItem(attached_object->getAttachmentItemID());
|
||||
if (itemp)
|
||||
{
|
||||
label += std::string(" (") + itemp->getName() + std::string(")");
|
||||
break;
|
||||
}
|
||||
label += std::string(" (") + itemp->getName() + std::string(")");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -6683,23 +6672,16 @@ void attach_label(std::string& label, void* user_data)
|
||||
|
||||
void detach_label(std::string& label, void* user_data)
|
||||
{
|
||||
LLViewerJointAttachment *attachment = (LLViewerJointAttachment*)user_data;
|
||||
if (attachment)
|
||||
LLViewerJointAttachment* attachmentp = (LLViewerJointAttachment*)user_data;
|
||||
if (attachmentp)
|
||||
{
|
||||
label = attachment->getName();
|
||||
for (LLViewerJointAttachment::attachedobjs_vec_t::const_iterator attachment_iter = attachment->mAttachedObjects.begin();
|
||||
attachment_iter != attachment->mAttachedObjects.end();
|
||||
++attachment_iter)
|
||||
label = attachmentp->getName();
|
||||
if (attachmentp->getObject())
|
||||
{
|
||||
const LLViewerObject* attached_object = (*attachment_iter);
|
||||
if (attached_object)
|
||||
LLViewerInventoryItem* itemp = gInventory.getItem(attachmentp->getItemID());
|
||||
if (itemp)
|
||||
{
|
||||
LLViewerInventoryItem* itemp = gInventory.getItem(attached_object->getAttachmentItemID());
|
||||
if (itemp)
|
||||
{
|
||||
label += std::string(" (") + itemp->getName() + std::string(")");
|
||||
break;
|
||||
}
|
||||
label += std::string(" (") + itemp->getName() + std::string(")");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -6802,27 +6784,23 @@ class LLAttachmentEnableDrop : public view_listener_t
|
||||
|
||||
if ( attachment_pt )
|
||||
{
|
||||
for (LLViewerJointAttachment::attachedobjs_vec_t::iterator attachment_iter = attachment_pt->mAttachedObjects.begin();
|
||||
attachment_iter != attachment_pt->mAttachedObjects.end();
|
||||
++attachment_iter)
|
||||
// make sure item is in your inventory (it could be a delayed attach message being sent from the sim)
|
||||
// so check to see if the item is in the inventory already
|
||||
item = gInventory.getItem(attachment_pt->getItemID());
|
||||
|
||||
if ( !item )
|
||||
{
|
||||
// make sure item is in your inventory (it could be a delayed attach message being sent from the sim)
|
||||
// so check to see if the item is in the inventory already
|
||||
item = gInventory.getItem((*attachment_iter)->getAttachmentItemID());
|
||||
if (!item)
|
||||
{
|
||||
// Item does not exist, make an observer to enable the pie menu
|
||||
// when the item finishes fetching worst case scenario
|
||||
// if a fetch is already out there (being sent from a slow sim)
|
||||
// we refetch and there are 2 fetches
|
||||
LLWornItemFetchedObserver* wornItemFetched = new LLWornItemFetchedObserver();
|
||||
LLInventoryFetchObserver::item_ref_t items; //add item to the inventory item to be fetched
|
||||
// Item does not exist, make an observer to enable the pie menu
|
||||
// when the item finishes fetching worst case scenario
|
||||
// if a fetch is already out there (being sent from a slow sim)
|
||||
// we refetch and there are 2 fetches
|
||||
LLWornItemFetchedObserver* wornItemFetched = new LLWornItemFetchedObserver();
|
||||
LLInventoryFetchObserver::item_ref_t items; //add item to the inventory item to be fetched
|
||||
|
||||
items.push_back((*attachment_iter)->getAttachmentItemID());
|
||||
|
||||
wornItemFetched->fetchItems(items);
|
||||
gInventory.addObserver(wornItemFetched);
|
||||
}
|
||||
items.push_back(attachment_pt->getItemID());
|
||||
|
||||
wornItemFetched->fetchItems(items);
|
||||
gInventory.addObserver(wornItemFetched);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -6941,7 +6919,7 @@ BOOL object_attached(void *user_data)
|
||||
{
|
||||
LLViewerJointAttachment *attachment = (LLViewerJointAttachment *)user_data;
|
||||
|
||||
return attachment->getNumObjects() > 0;
|
||||
return attachment->getObject() != NULL;
|
||||
}
|
||||
|
||||
class LLAvatarSendIM : public view_listener_t
|
||||
@@ -7209,23 +7187,17 @@ void handle_dump_attachments(void*)
|
||||
LLVOAvatar::attachment_map_t::iterator curiter = iter++;
|
||||
LLViewerJointAttachment* attachment = curiter->second;
|
||||
S32 key = curiter->first;
|
||||
for (LLViewerJointAttachment::attachedobjs_vec_t::iterator attachment_iter = attachment->mAttachedObjects.begin();
|
||||
attachment_iter != attachment->mAttachedObjects.end();
|
||||
++attachment_iter)
|
||||
{
|
||||
LLViewerObject *attached_object = (*attachment_iter);
|
||||
BOOL visible = (attached_object != NULL &&
|
||||
attached_object->mDrawable.notNull() &&
|
||||
!attached_object->mDrawable->isRenderType(0));
|
||||
LLVector3 pos;
|
||||
if (visible) pos = attached_object->mDrawable->getPosition();
|
||||
llinfos << "ATTACHMENT " << key << ": item_id=" << attached_object->getAttachmentItemID()
|
||||
<< (attached_object ? " present " : " absent ")
|
||||
<< (visible ? "visible " : "invisible ")
|
||||
<< " at " << pos
|
||||
<< " and " << (visible ? attached_object->getPosition() : LLVector3::zero)
|
||||
<< llendl;
|
||||
}
|
||||
BOOL visible = (attachment->getObject() != NULL &&
|
||||
attachment->getObject()->mDrawable.notNull() &&
|
||||
!attachment->getObject()->mDrawable->isRenderType(0));
|
||||
LLVector3 pos;
|
||||
if (visible) pos = attachment->getObject()->mDrawable->getPosition();
|
||||
llinfos << "ATTACHMENT " << key << ": item_id=" << attachment->getItemID()
|
||||
<< (attachment->getObject() ? " present " : " absent ")
|
||||
<< (visible ? "visible " : "invisible ")
|
||||
<< " at " << pos
|
||||
<< " and " << (visible ? attachment->getObject()->getPosition() : LLVector3::zero)
|
||||
<< llendl;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user