Puh some fixes mostly to ripout
This commit is contained in:
@@ -125,7 +125,7 @@ void dec_busy_count()
|
||||
|
||||
// Function declarations
|
||||
struct LLWearableHoldingPattern;
|
||||
void wear_inventory_category_on_avatar(LLInventoryCategory* category, BOOL append, BOOL replace = FALSE);
|
||||
void wear_inventory_category_on_avatar(LLInventoryCategory* category, BOOL append);
|
||||
void wear_inventory_category_on_avatar_step2( BOOL proceed, void* userdata);
|
||||
void wear_inventory_category_on_avatar_loop(LLWearable* wearable, void*);
|
||||
void wear_inventory_category_on_avatar_step3(LLWearableHoldingPattern* holder, BOOL append);
|
||||
@@ -187,7 +187,6 @@ struct LLWearInfo
|
||||
{
|
||||
LLUUID mCategoryID;
|
||||
BOOL mAppend;
|
||||
BOOL mReplace;
|
||||
};
|
||||
|
||||
|
||||
@@ -1890,10 +1889,6 @@ void LLFolderBridge::performAction(LLFolderView* folder, LLInventoryModel* model
|
||||
{
|
||||
modifyOutfit(TRUE);
|
||||
}
|
||||
else if ("wearitems" == action)
|
||||
{
|
||||
modifyOutfit(TRUE, TRUE);
|
||||
}
|
||||
else if ("removefromoutfit" == action)
|
||||
{
|
||||
// <edit> derf
|
||||
@@ -2255,7 +2250,6 @@ void LLFolderBridge::folderOptionsMenu()
|
||||
{
|
||||
// </edit>
|
||||
mItems.push_back(std::string("Add To Outfit"));
|
||||
mItems.push_back(std::string("Wear Items"));
|
||||
mItems.push_back(std::string("Replace Outfit"));
|
||||
// <edit>
|
||||
}
|
||||
@@ -2608,7 +2602,7 @@ void LLFolderBridge::createWearable(LLUUID parent_id, EWearableType type)
|
||||
LLPointer<LLInventoryCallback>(NULL));
|
||||
}
|
||||
|
||||
void LLFolderBridge::modifyOutfit(BOOL append, BOOL replace)
|
||||
void LLFolderBridge::modifyOutfit(BOOL append)
|
||||
{
|
||||
// <edit> derf
|
||||
if(std::find(LLInventoryPanel::sInstances.begin(), LLInventoryPanel::sInstances.end(), mInventoryPanel) == LLInventoryPanel::sInstances.end())
|
||||
@@ -2622,7 +2616,7 @@ void LLFolderBridge::modifyOutfit(BOOL append, BOOL replace)
|
||||
LLViewerInventoryCategory* cat = getCategory();
|
||||
if(!cat) return;
|
||||
|
||||
wear_inventory_category_on_avatar(cat, append, replace);
|
||||
wear_inventory_category_on_avatar( cat, append );
|
||||
}
|
||||
|
||||
// helper stuff
|
||||
@@ -3820,56 +3814,6 @@ void LLObjectBridge::performAction(LLFolderView* folder, LLInventoryModel* model
|
||||
// Could be first use
|
||||
LLFirstUse::useBuild();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
>>>>>>> ec55705... THE BIGGIE.
|
||||
else LLItemBridge::performAction(folder, model, action);
|
||||
}
|
||||
|
||||
@@ -4619,7 +4563,7 @@ void wear_inventory_category(LLInventoryCategory* category, bool copy, bool appe
|
||||
}
|
||||
|
||||
// *NOTE: hack to get from avatar inventory to avatar
|
||||
void wear_inventory_category_on_avatar(LLInventoryCategory* category, BOOL append, BOOL replace)
|
||||
void wear_inventory_category_on_avatar( LLInventoryCategory* category, BOOL append )
|
||||
{
|
||||
// Avoid unintentionally overwriting old wearables. We have to do
|
||||
// this up front to avoid having to deal with the case of multiple
|
||||
@@ -4630,7 +4574,6 @@ void wear_inventory_category_on_avatar(LLInventoryCategory* category, BOOL appen
|
||||
|
||||
LLWearInfo* userdata = new LLWearInfo;
|
||||
userdata->mAppend = append;
|
||||
userdata->mReplace = replace;
|
||||
userdata->mCategoryID = category->getUUID();
|
||||
|
||||
if( gFloaterCustomize )
|
||||
@@ -4828,11 +4771,7 @@ void wear_inventory_category_on_avatar_step2( BOOL proceed, void* userdata )
|
||||
msg->nextBlockFast(_PREHASH_ObjectData );
|
||||
msg->addUUIDFast(_PREHASH_ItemID, item->getUUID() );
|
||||
msg->addUUIDFast(_PREHASH_OwnerID, item->getPermissions().getOwner());
|
||||
<<<<<<< HEAD
|
||||
msg->addU8Fast(_PREHASH_AttachmentPt, wear_info->mReplace ? 0 : ATTACHMENT_ADD); // Wear at the previous or default attachment point
|
||||
=======
|
||||
msg->addU8Fast(_PREHASH_AttachmentPt, 0 ); // Wear at the previous or default attachment point
|
||||
>>>>>>> ec55705... THE BIGGIE.
|
||||
pack_permissions_slam(msg, item->getFlags(), item->getPermissions());
|
||||
msg->addStringFast(_PREHASH_Name, item->getName());
|
||||
msg->addStringFast(_PREHASH_Description, item->getDescription());
|
||||
@@ -5588,20 +5527,4 @@ void LLWearableBridge::onRemoveFromAvatarArrived(LLWearable* wearable,
|
||||
}
|
||||
delete item_id;
|
||||
}
|
||||
<<<<<<< HEAD
|
||||
|
||||
const LLUUID &LLLinkFolderBridge::getFolderID() const
|
||||
{
|
||||
if (LLViewerInventoryItem *link_item = getItem())
|
||||
{
|
||||
if (const LLViewerInventoryCategory *cat = link_item->getLinkedCategory())
|
||||
{
|
||||
const LLUUID& cat_uuid = cat->getUUID();
|
||||
return cat_uuid;
|
||||
}
|
||||
}
|
||||
return LLUUID::null;
|
||||
}
|
||||
|
||||
=======
|
||||
>>>>>>> ec55705... THE BIGGIE.
|
||||
|
||||
@@ -327,7 +327,7 @@ protected:
|
||||
|
||||
BOOL checkFolderForContentsOfType(LLInventoryModel* model, LLInventoryCollectFunctor& typeToCheck);
|
||||
|
||||
void modifyOutfit(BOOL append, BOOL replace = FALSE);
|
||||
void modifyOutfit(BOOL append);
|
||||
public:
|
||||
static LLFolderBridge* sSelf;
|
||||
static void staticFolderOptionsMenu();
|
||||
|
||||
@@ -312,11 +312,7 @@ void LLNetMap::draw()
|
||||
memset( default_texture, 0, mObjectImagep->getWidth() * mObjectImagep->getHeight() * mObjectImagep->getComponents() );
|
||||
|
||||
// Draw buildings
|
||||
//gObjectList.renderObjectsForMap(*this);
|
||||
if(!gSavedSettings.getBOOL("MoyFastMiniMap")){
|
||||
gObjectList.renderObjectsForMap(*this);
|
||||
mObjectImagep->setSubImage(mObjectRawImagep, 0, 0, mObjectImagep->getWidth(), mObjectImagep->getHeight());
|
||||
}
|
||||
gObjectList.renderObjectsForMap(*this);
|
||||
|
||||
mObjectImagep->setSubImage(mObjectRawImagep, 0, 0, mObjectImagep->getWidth(), mObjectImagep->getHeight());
|
||||
|
||||
|
||||
@@ -39,7 +39,6 @@
|
||||
|
||||
#include "llaudioengine.h"
|
||||
#include "noise.h"
|
||||
#include "llsdserialize.h"
|
||||
|
||||
#include "llagent.h" // Get state values from here
|
||||
#include "llviewercontrol.h"
|
||||
@@ -54,7 +53,6 @@
|
||||
|
||||
#include "llhudeffecttrail.h"
|
||||
#include "llhudmanager.h"
|
||||
#include "llinventorybridge.h"
|
||||
#include "llinventoryview.h"
|
||||
#include "llkeyframefallmotion.h"
|
||||
#include "llkeyframestandmotion.h"
|
||||
@@ -723,10 +721,6 @@ F32 LLVOAvatar::sGreyTime = 0.f;
|
||||
F32 LLVOAvatar::sGreyUpdateTime = 0.f;
|
||||
bool LLVOAvatar::sDoProperArc = true;
|
||||
|
||||
// Globals
|
||||
LLFrameTimer gAttachmentsTimer;
|
||||
bool gAttachmentsListDirty = true;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Helper functions
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -841,7 +835,6 @@ LLVOAvatar::LLVOAvatar(const LLUUID& id,
|
||||
{
|
||||
mIsSelf = TRUE;
|
||||
gAgent.setAvatarObject(this);
|
||||
gAttachmentsTimer.reset();
|
||||
lldebugs << "Marking avatar as self " << id << llendl;
|
||||
}
|
||||
else
|
||||
@@ -2723,10 +2716,6 @@ BOOL LLVOAvatar::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time)
|
||||
|
||||
// attach objects that were waiting for a drawable
|
||||
lazyAttach();
|
||||
if (mIsSelf)
|
||||
{
|
||||
checkAttachments();
|
||||
}
|
||||
|
||||
// animate the character
|
||||
// store off last frame's root position to be consistent with camera position
|
||||
@@ -2763,133 +2752,6 @@ BOOL LLVOAvatar::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void LLVOAvatar::checkAttachments()
|
||||
{
|
||||
const F32 LAZY_ATTACH_DELAY = 15.0f;
|
||||
static bool first_run = true;
|
||||
|
||||
if (!mIsSelf)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (mPendingAttachment.size() == 0)
|
||||
{
|
||||
if (first_run)
|
||||
{
|
||||
if (gAttachmentsTimer.getElapsedTimeF32() > LAZY_ATTACH_DELAY)
|
||||
{
|
||||
first_run = false;
|
||||
LLVOAvatar* avatarp = gAgent.getAvatarObject();
|
||||
if (!avatarp) return;
|
||||
std::set<LLUUID> worn;
|
||||
for (LLVOAvatar::attachment_map_t::iterator iter = avatarp->mAttachmentPoints.begin();
|
||||
iter != avatarp->mAttachmentPoints.end(); )
|
||||
{
|
||||
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_iter);
|
||||
if (attached_object)
|
||||
{
|
||||
worn.insert(attached_object->getAttachmentItemID());
|
||||
}
|
||||
}
|
||||
}
|
||||
std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, "attachments.xml");
|
||||
//llinfos << "Reading the saved worn attachments list from: " << filename << llendl;
|
||||
LLSD list;
|
||||
llifstream llsd_xml;
|
||||
llsd_xml.open(filename.c_str(), std::ios::in | std::ios::binary);
|
||||
if (llsd_xml.is_open())
|
||||
{
|
||||
LLSDSerialize::fromXML(list, llsd_xml);
|
||||
for (LLSD::map_iterator iter = list.beginMap(); iter != list.endMap(); iter++)
|
||||
{
|
||||
LLSD array = iter->second;
|
||||
if (array.isArray())
|
||||
{
|
||||
for (int i = 0; i < array.size(); i++)
|
||||
{
|
||||
LLSD map = array[i];
|
||||
if (map.has("inv_item_id"))
|
||||
{
|
||||
LLUUID item_id = map.get("inv_item_id");
|
||||
if (worn.find(item_id) == worn.end())
|
||||
{
|
||||
LLViewerInventoryItem* item = gInventory.getItem(item_id);
|
||||
if (item)
|
||||
{
|
||||
rez_attachment(item, NULL, false);
|
||||
}
|
||||
else
|
||||
{
|
||||
llwarns << item_id.asString() << " not found in inventory, could not reattach." << llendl;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
llwarns << "Malformed attachments list file (no \"inv_item_id\" key). Aborting." << llendl;
|
||||
llsd_xml.close();
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
llwarns << "Malformed attachments list file (not an array). Aborting." << llendl;
|
||||
llsd_xml.close();
|
||||
return;
|
||||
}
|
||||
}
|
||||
llsd_xml.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (gAttachmentsListDirty)
|
||||
{
|
||||
gAttachmentsListDirty = false;
|
||||
LLSD list;
|
||||
LLSD array = list.emptyArray();
|
||||
LLVOAvatar* avatarp = gAgent.getAvatarObject();
|
||||
if (!avatarp) return;
|
||||
for (LLVOAvatar::attachment_map_t::iterator iter = avatarp->mAttachmentPoints.begin();
|
||||
iter != avatarp->mAttachmentPoints.end(); )
|
||||
{
|
||||
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_iter);
|
||||
if (attached_object)
|
||||
{
|
||||
LLSD entry = list.emptyMap();
|
||||
entry.insert("inv_item_id", attached_object->getAttachmentItemID());
|
||||
array.append(entry);
|
||||
}
|
||||
}
|
||||
}
|
||||
list.insert("attachments", array);
|
||||
std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, "attachments.xml");
|
||||
llofstream list_file(filename);
|
||||
LLSDSerialize::toPrettyXML(list, list_file);
|
||||
list_file.close();
|
||||
//llinfos << "Worn attachments list saved to: " << filename << llendl;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
gAttachmentsListDirty = true;
|
||||
gAttachmentsTimer.reset();
|
||||
}
|
||||
}
|
||||
|
||||
void LLVOAvatar::idleUpdateVoiceVisualizer(bool voice_enabled)
|
||||
{
|
||||
// disable voice visualizer when in mouselook
|
||||
@@ -3643,6 +3505,9 @@ void LLVOAvatar::idleUpdateNameTag(const LLVector3& root_pos_last)
|
||||
new_name = TRUE;
|
||||
}
|
||||
|
||||
LLNameValue *title = getNVPair("Title");
|
||||
LLNameValue* firstname = getNVPair("FirstName");
|
||||
LLNameValue* lastname = getNVPair("LastName");
|
||||
|
||||
// <edit>
|
||||
std::string client;
|
||||
@@ -3805,10 +3670,8 @@ void LLVOAvatar::idleUpdateNameTag(const LLVector3& root_pos_last)
|
||||
sNumVisibleChatBubbles--;
|
||||
}
|
||||
}
|
||||
|
||||
LLNameValue *title = getNVPair("Title");
|
||||
LLNameValue* firstname = getNVPair("FirstName");
|
||||
LLNameValue* lastname = getNVPair("LastName");
|
||||
|
||||
|
||||
|
||||
if (mNameText.notNull() && firstname && lastname)
|
||||
{
|
||||
@@ -7085,22 +6948,12 @@ void LLVOAvatar::addChild(LLViewerObject *childp)
|
||||
{
|
||||
mPendingAttachment.push_back(childp);
|
||||
}
|
||||
if (mIsSelf)
|
||||
{
|
||||
gAttachmentsListDirty = true;
|
||||
gAttachmentsTimer.reset();
|
||||
}
|
||||
}
|
||||
|
||||
void LLVOAvatar::removeChild(LLViewerObject *childp)
|
||||
{
|
||||
LLViewerObject::removeChild(childp);
|
||||
detachObject(childp);
|
||||
if (mIsSelf)
|
||||
{
|
||||
gAttachmentsListDirty = true;
|
||||
gAttachmentsTimer.reset();
|
||||
}
|
||||
}
|
||||
|
||||
LLViewerJointAttachment* LLVOAvatar::getTargetAttachmentPoint(LLViewerObject* viewer_object)
|
||||
@@ -7193,11 +7046,6 @@ void LLVOAvatar::lazyAttach()
|
||||
if (mPendingAttachment[i]->mDrawable)
|
||||
{
|
||||
attachObject(mPendingAttachment[i]);
|
||||
if (mIsSelf)
|
||||
{
|
||||
gAttachmentsListDirty = true;
|
||||
gAttachmentsTimer.reset();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -7206,11 +7054,6 @@ void LLVOAvatar::lazyAttach()
|
||||
}
|
||||
|
||||
mPendingAttachment = still_pending;
|
||||
if (mIsSelf && still_pending.size() > 0)
|
||||
{
|
||||
gAttachmentsListDirty = true;
|
||||
gAttachmentsTimer.reset();
|
||||
}
|
||||
}
|
||||
|
||||
void LLVOAvatar::resetHUDAttachments()
|
||||
|
||||
@@ -300,7 +300,6 @@ public:
|
||||
BOOL attachObject(LLViewerObject *viewer_object);
|
||||
BOOL detachObject(LLViewerObject *viewer_object);
|
||||
void lazyAttach();
|
||||
void checkAttachments();
|
||||
|
||||
void sitOnObject(LLViewerObject *sit_object);
|
||||
void getOffObject();
|
||||
|
||||
@@ -4871,7 +4871,7 @@ void LLPipeline::resetVertexBuffers(LLDrawable* drawable)
|
||||
void LLPipeline::resetVertexBuffers()
|
||||
{
|
||||
sRenderBump = gSavedSettings.getBOOL("RenderObjectBump");
|
||||
LLVertexBuffer::sUseStreamDraw = gSavedSettings.getBOOL("RenderUseStreamVBO");
|
||||
LLVertexBuffer::sUseStreamDraw = gSavedSettings.getBOOL("ShyotlRenderUseStreamVBO");
|
||||
for (LLWorld::region_list_t::const_iterator iter = LLWorld::getInstance()->getRegionList().begin();
|
||||
iter != LLWorld::getInstance()->getRegionList().end(); ++iter)
|
||||
{
|
||||
|
||||
@@ -200,10 +200,6 @@
|
||||
mouse_opaque="true" name="Add To Outfit" width="128">
|
||||
<on_click filter="" function="Inventory.DoToSelected" userdata="addtooutfit" />
|
||||
</menu_item_call>
|
||||
<menu_item_call bottom_delta="-18" height="18" label="Wear Items" left="0"
|
||||
mouse_opaque="true" name="Wear Items" width="128">
|
||||
<on_click filter="" function="Inventory.DoToSelected" userdata="wearitems" />
|
||||
</menu_item_call>
|
||||
<menu_item_call bottom_delta="-18" height="18" label="Replace Outfit" left="0"
|
||||
mouse_opaque="true" name="Replace Outfit" width="128">
|
||||
<on_click filter="" function="Inventory.DoToSelected" userdata="replaceoutfit" />
|
||||
|
||||
Reference in New Issue
Block a user