diff --git a/indra/llrender/llfontgl.cpp b/indra/llrender/llfontgl.cpp index c3d50678f..5d83f34be 100644 --- a/indra/llrender/llfontgl.cpp +++ b/indra/llrender/llfontgl.cpp @@ -788,9 +788,12 @@ S32 LLFontGL::maxDrawableChars(const llwchar* wchars, F32 max_pixels, S32 max_ch { return 0; } - - llassert(max_pixels >= 0.f); - llassert(max_chars >= 0); + + //llassert(max_pixels >= 0.f); + //llassert(max_chars >= 0); + if(max_pixels < 0.f || max_chars < 0) { + return 0; + } BOOL clip = FALSE; F32 cur_x = 0; diff --git a/indra/newview/hippogridmanager.cpp b/indra/newview/hippogridmanager.cpp index 1cc6eca64..7c5044205 100644 --- a/indra/newview/hippogridmanager.cpp +++ b/indra/newview/hippogridmanager.cpp @@ -600,7 +600,14 @@ void HippoGridInfo::initFallback() FALLBACK_GRIDINFO.setHelperUri("http://127.0.0.1:9000/"); } - +bool HippoGridInfo::supportsInvLinks(){ + if(isSecondLife()) + return true; + else if(mLoginUri.find("avination.")!=std::string::npos) + return true; + else + return false; +} // ******************************************************************** // ******************************************************************** diff --git a/indra/newview/hippogridmanager.h b/indra/newview/hippogridmanager.h index 8429dbaf6..0432c59bf 100644 --- a/indra/newview/hippogridmanager.h +++ b/indra/newview/hippogridmanager.h @@ -85,6 +85,7 @@ public: void setCurrencySymbol(const std::string& sym); void setRealCurrencySymbol(const std::string& sym); void setDirectoryFee(int fee); + bool supportsInvLinks(); bool retrieveGridInfo(); diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index 3f39909fb..5917d402f 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -7367,10 +7367,10 @@ void LLAgent::makeNewOutfit( return; } - BOOL fUseLinks = gSavedSettings.getBOOL("UseInventoryLinks") && - gHippoGridManager->getConnectedGrid()->isSecondLife(); + BOOL fUseLinks = !gSavedSettings.getBOOL("UseInventoryLinks") || + !gHippoGridManager->getConnectedGrid()->supportsInvLinks(); BOOL fUseOutfits = gSavedSettings.getBOOL("UseOutfitFolders") && - gHippoGridManager->getConnectedGrid()->isSecondLife(); + gHippoGridManager->getConnectedGrid()->supportsInvLinks(); LLAssetType::EType typeDest = (fUseOutfits) ? LLAssetType::AT_MY_OUTFITS : LLAssetType::AT_CLOTHING; LLAssetType::EType typeFolder = (fUseOutfits) ? LLAssetType::AT_OUTFIT : LLAssetType::AT_NONE; @@ -8483,10 +8483,11 @@ void LLAgent::userAttachMultipleAttachments(LLInventoryModel::item_array_t& obj_ } const LLInventoryItem* item = obj_item_array.get(i).get(); + bool replace = !gHippoGridManager->getConnectedGrid()->supportsInvLinks(); msg->nextBlockFast(_PREHASH_ObjectData ); msg->addUUIDFast(_PREHASH_ItemID, item->getLinkedUUID()); msg->addUUIDFast(_PREHASH_OwnerID, item->getPermissions().getOwner()); - msg->addU8Fast(_PREHASH_AttachmentPt, 0 | ATTACHMENT_ADD); // Wear at the previous or default attachment point + msg->addU8Fast(_PREHASH_AttachmentPt, replace? 0 : ATTACHMENT_ADD); // Wear at the previous or default attachment point pack_permissions_slam(msg, item->getFlags(), item->getPermissions()); msg->addStringFast(_PREHASH_Name, item->getName()); msg->addStringFast(_PREHASH_Description, item->getDescription()); diff --git a/indra/newview/llfloatercustomize.cpp b/indra/newview/llfloatercustomize.cpp index 359c8a19c..337cf1956 100644 --- a/indra/newview/llfloatercustomize.cpp +++ b/indra/newview/llfloatercustomize.cpp @@ -220,11 +220,11 @@ public: } } - if(!gHippoGridManager->getConnectedGrid()->isSecondLife()) { + if(!gHippoGridManager->getConnectedGrid()->supportsInvLinks()) { childSetEnabled("checkbox_use_links", FALSE); childSetValue("checkbox_use_links", FALSE); childSetEnabled("checkbox_use_outfits", FALSE); - childSetValue("checkbox_use_outfits", FALSE); + childSetValue("checkbox_use_outfits", FALSE); } childSetAction("Save", onSave, this ); diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index e2e844eaa..fe105e24b 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -528,7 +528,7 @@ BOOL LLInvFVBridge::isClipboardPasteable() const BOOL LLInvFVBridge::isClipboardPasteableAsLink() const { - if (!gHippoGridManager->getConnectedGrid()->isSecondLife()) + if (!gHippoGridManager->getConnectedGrid()->supportsInvLinks()) { return FALSE; } @@ -1382,7 +1382,7 @@ BOOL LLItemBridge::isItemCopyable() const LLViewerInventoryItem* item = getItem(); if (item && !item->getIsLinkType()) { - if(!gHippoGridManager->getConnectedGrid()->isSecondLife()) { + if(!gHippoGridManager->getConnectedGrid()->supportsInvLinks()) { return (item->getPermissions().allowCopyBy(gAgent.getID())); } else { // All items can be copied since you can @@ -2401,7 +2401,7 @@ void LLFolderBridge::folderOptionsMenu() if(!(LLXmlImport::sImportInProgress && LLXmlImport::sImportHasAttachments)) { // - if (gHippoGridManager->getConnectedGrid()->isSecondLife()) + if (gHippoGridManager->getConnectedGrid()->supportsInvLinks()) mItems.push_back(std::string("Add To Outfit")); mItems.push_back(std::string("Wear Items")); mItems.push_back(std::string("Replace Outfit")); @@ -4179,7 +4179,7 @@ void LLObjectBridge::buildContextMenu(LLMenuGL& menu, U32 flags) { items.push_back(std::string("Attach Separator")); items.push_back(std::string("Object Wear")); - if (gHippoGridManager->getConnectedGrid()->isSecondLife()) + if (gHippoGridManager->getConnectedGrid()->supportsInvLinks()) items.push_back(std::string("Object Add")); if (!avatarp->canAttachMoreObjects()) { @@ -4668,7 +4668,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) -{ +{ // Avoid unintentionally overwriting old wearables. We have to do // this up front to avoid having to deal with the case of multiple // wearables being dirty. diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index b6922c4ec..8a6a41ff7 100644 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -3614,7 +3614,7 @@ void LLSelectMgr::sendAttach(U8 attachment_point) if (0 == attachment_point || get_if_there(gAgent.getAvatarObject()->mAttachmentPoints, (S32)attachment_point, (LLViewerJointAttachment*)NULL)) { - if (attachment_point != 0 && gHippoGridManager->getConnectedGrid()->isSecondLife()) + if (attachment_point != 0 && gHippoGridManager->getConnectedGrid()->supportsInvLinks()) { // If we know the attachment point then we got here by clicking an // "Attach to..." context menu item, so we should add, not replace. diff --git a/indra/newview/llwearable.cpp b/indra/newview/llwearable.cpp index d64ae5eaa..75e0f2a62 100644 --- a/indra/newview/llwearable.cpp +++ b/indra/newview/llwearable.cpp @@ -622,6 +622,7 @@ BOOL LLWearable::isDirty() const LLUUID& image_id = get_if_there(mTEMap, te, LLVOAvatar::getDefaultTEImageID((ETextureIndex) te ) ); if( avatar_image->getID() != image_id ) { + llwarns << "image ID " << avatar_image->getID() << " was changed." << llendl; return TRUE; } }