Skip to content
Snippets Groups Projects
Commit f0c14554 authored by Kitty Barnett's avatar Kitty Barnett
Browse files

- fixed : @attach:folderA=force,attachover:folderB=force,attach:folderA=force...

- fixed : @attach:folderA=force,attachover:folderB=force,attach:folderA=force results in undefined/undesirable behaviour?
    -> previously implementation would replace any "conflicting" wearable type from folderB that also exists in folderA
    -> if an item in folderA is fully worn then trying to "rewear" then it (probably) makes more sense that this should have no effect
- fixed : @attach:folderA=force followed by another @attach:folderA=force will (re)wear the wearables contained in folderA even if they're already worn

--HG--
branch : RLVa
parent 57d71975
No related branches found
No related tags found
No related merge requests found
......@@ -676,11 +676,11 @@ void RlvForceWear::remAttachment(const LLViewerObject* pAttachObj)
// Checked: 2010-08-30 (RLVa-1.2.1c) | Modified: RLVa-1.2.1c
void RlvForceWear::addWearable(const LLViewerInventoryItem* pItem, EWearAction eAction)
{
// When replacing remove all currently worn wearables of this type
if (ACTION_WEAR_REPLACE == eAction)
const LLWearable* pWearable = gAgentWearables.getWearableFromItemID(pItem->getLinkedUUID());
// When replacing remove all currently worn wearables of this type *unless* the item is currently worn
if ( (ACTION_WEAR_REPLACE == eAction) && (!pWearable) )
forceRemove(pItem->getWearableType());
// Remove it from 'm_remWearables' if it's pending removal
const LLWearable* pWearable = gAgentWearables.getWearableFromItemID(pItem->getLinkedUUID());;
if ( (pWearable) && (isRemWearable(pWearable)) )
m_remWearables.erase(std::remove(m_remWearables.begin(), m_remWearables.end(), pWearable), m_remWearables.end());
......@@ -801,12 +801,16 @@ void RlvForceWear::done()
for (S32 idxItem = 0, cntItem = wearItems.count(); idxItem < cntItem; idxItem++)
{
LLViewerInventoryItem* pItem = wearItems.get(idxItem);
if (LLAssetType::AT_BODYPART == pItem->getType())
addBodyParts.push_back(pItem);
else
addClothing.push_back(pItem);
if (!pAppearanceMgr->isLinkInCOF(pItem->getUUID())) // It's important to examine COF here and *not* gAgentWearables
{
if (LLAssetType::AT_BODYPART == pItem->getType())
addBodyParts.push_back(pItem);
else
addClothing.push_back(pItem);
}
}
}
m_addWearables.clear();
// Until LL provides a way for updateCOF to selectively attach add/replace we have to deal with attachments ourselves
if (m_addAttachments.size())
......@@ -832,12 +836,10 @@ void RlvForceWear::done()
}
// If there are additions we need to call LLAppearanceManager::updateCOF(), otherwise LLAppearanceManager::updateAppearanceFromCOF()
if ( (!m_addWearables.empty()) || (!m_addAttachments.empty()) || (!m_addGestures.empty()) )
if ( (!addBodyParts.empty()) || (!addClothing.empty()) || (!m_addGestures.empty()) )
{
pAppearanceMgr->updateCOF(addBodyParts, addClothing, LLInventoryModel::item_array_t(), m_addGestures, true);
m_addWearables.clear();
m_addAttachments.clear();
m_addGestures.clear();
}
else if (fUpdateAppearance)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment